PLBTIME(3plplot)

πŸ’– PLBTIME πŸ’–

okay so bestie, welcome to the PLplot API β€” this little page is all about plbtime, a function that's literally the glow-up reverse of plctime. let's get into it πŸŽ€

✨ NAME ✨

plbtime β€” calculates the broken-down time from continuous time for the current stream. yeah. that's the whole vibe. πŸ’…

πŸ¦‹ SYNOPSIS πŸ¦‹

plbtime(year, month, day, hour, min, sec, ctime)

🌸 DESCRIPTION 🌸

so what does it actually do? it calculates broken-down time β€” that's year, month, day, hour, min, sec β€” from ctime, the continuous time, for the current stream. it's the exact inverse of plctime(3plplot), no cap. πŸ”

the PLplot definition of broken-down time is a calendar time that completely ignores all time zone offsets. like, entirely. so it's your responsibility to apply those offsets (if you even want to) before you use the PLplot time API. no hand-holding here πŸ™ˆ

by default, broken-down time is defined using the proleptic Gregorian calendar without any insertion of leap seconds, and continuous time is defined as the number of seconds since the Unix epoch of 1970-01-01T00:00:00Z. iconic. but other definitions of broken-down and continuous time are totally possible β€” see plconfigtime(3plplot) if you wanna customize the vibe ⭐

Redacted form: General: plbtime(year, month, day, hour, min, sec, ctime)

this function is used in example 29 btw, in case you wanted to see it slay in the wild πŸ‘‘


πŸŽ€ ARGUMENTS πŸŽ€

  • year (PLINT_NC_SCALAR(3plplot), output) β€” the returned value of years, where positive values correspond to CE (so 1 = 1 CE, etc.) and non-negative values correspond to BCE (so 0 = 1 BCE, -1 = 2 BCE, etc.). yes the BCE math is a little cursed, we don't make the rules 😭
  • month (PLINT_NC_SCALAR(3plplot), output) β€” the returned value of the month within the year, in the range from 0 (January) to 11 (December). zero-indexed, as the devs intended πŸ’€
  • day (PLINT_NC_SCALAR(3plplot), output) β€” the returned value of the day within the month, in the range from 1 to 31.
  • hour (PLINT_NC_SCALAR(3plplot), output) β€” the returned value of the hour within the day, in the range from 0 to 23.
  • min (PLINT_NC_SCALAR(3plplot), output) β€” the returned value of the minute within the hour, in the range from 0 to 59.
  • sec (PLFLT_NC_SCALAR(3plplot), output) β€” the returned value of the second within the minute, in range from 0. to 60. β€” and yeah, it's a PLFLT, so it can be all fractional and cute πŸ“
  • ctime (PLFLT(3plplot), input) β€” the continuous time from which the broken-down time gets calculated. this is the input, the rest are outputs, iykyk ✨

πŸ’œ AUTHORS πŸ’œ

so many developers have contributed to PLplot over its long, long history β€” and they're all credited at http://plplot.sourceforge.net/credits.php. absolute legends, every one of them 🫢

🌈 SEE ALSO 🌈

PLplot documentation at http://plplot.sourceforge.net/documentation.php β€” go read it, it's giving main character energy πŸ“š


ngl bestie, that's the whole page β€” every flag, every range, every calendar caveat, all intact. now go calculate some time πŸ’…βœ¨

mwah πŸ’‹ β€” this was PLBTIME(3plplot), from the PLplot API, dated August, 2026. see u in the next manpage, bestie πŸ¦‹

πŸ“¦ where this page comes from