SOF3 / InfoAPI

Placeholder registry and formatting API.
https://sof3.github.io/InfoAPI/defaults
Apache License 2.0
34 stars 5 forks source link

DateTimeInfo and DurationInfo #5

Closed SOF3 closed 2 years ago

SOF3 commented 2 years ago

DateTime

Wraps a timestamp

Name Output type Description Example
infoapi.time.year Number The year part of a date 2006
infoapi.time.month Number The month part of a date 1
infoapi.time.date Number The date part of a date 2
infoapi.time.weekday Text The weekday part of a date Mon
infoapi.time.hour Number The hour part of a time 15
infoapi.time.minute Number The minute part of a time 4
infoapi.time.second Number The second part of a time 5
infoapi.time.elapsed Duration The time since this timestamp
infoapi.time.remaining Duration The time until this timestamp (negative of elapsed)

Duration

Wraps a duration

Name Output type Description Example
infoapi.duration.days Number Number of days (rounded down) 3
infoapi.duration.rawDays Number Number of days (not rounded) 3.5
infoapi.duration.hours Number Number of hours (rounded down, excludes days) 12
infoapi.duration.rawHours Number Number of hours (not rounded, includes days) 84
infoapi.duration.minutes Number Number of minutes (rounded down, excludes hours) 0
infoapi.duration.rawMnutes Number Number of minutes (not rounded, includes hours) 5040
infoapi.duration.seconds Number Number of seconds (rounded down, excludes minutes) 0
infoapi.duration.rawSeconds Number Number of seconds (not rounded, includes minutes) 30240
infoapi.duration.later DateTime Time for duration after now
infoapi.duration.ago DateTime Time for duration before now
Endermanbugzjfc commented 2 years ago

Now, these features are is implemented. But why the issue is still not closed.

Endermanbugzjfc commented 2 years ago

Never mind. Didn't notice I still have a pull request to review.

I deleted the notification accidentally. My notifications are full of new plugins on Poggit and new releases of PocketMine-MP. 🤦‍♂️