diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-10-27 18:41:00 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-10-27 18:41:00 -0400 |
| commit | 0d615443dc452f85f3d6b1b2c82d92a9c8db1fff (patch) | |
| tree | 4fcc37c20916a3abe2bd6413bb129e1a663ed2e8 /stdlib/datetime.h | |
| parent | f4d22958f70924f630265467c847d2352f4a34c1 (diff) | |
Update DateTime API to have separate methods for getting each component
instead of get(...)
Diffstat (limited to 'stdlib/datetime.h')
| -rw-r--r-- | stdlib/datetime.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/stdlib/datetime.h b/stdlib/datetime.h index 96669aa3..ccbc5190 100644 --- a/stdlib/datetime.h +++ b/stdlib/datetime.h @@ -18,7 +18,15 @@ DateTime_t DateTime$after(DateTime_t dt, double seconds, double minutes, double CONSTFUNC double DateTime$seconds_till(DateTime_t now, DateTime_t then); CONSTFUNC double DateTime$minutes_till(DateTime_t now, DateTime_t then); CONSTFUNC double DateTime$hours_till(DateTime_t now, DateTime_t then); -void DateTime$get(DateTime_t dt, Int_t *year, Int_t *month, Int_t *day, Int_t *hour, Int_t *minute, Int_t *second, Int_t *nanosecond, Int_t *weekday, OptionalText_t timezone); +Int_t DateTime$year(DateTime_t dt, OptionalText_t timezone); +Int_t DateTime$month(DateTime_t dt, OptionalText_t timezone); +Int_t DateTime$day_of_week(DateTime_t dt, OptionalText_t timezone); +Int_t DateTime$day_of_month(DateTime_t dt, OptionalText_t timezone); +Int_t DateTime$day_of_year(DateTime_t dt, OptionalText_t timezone); +Int_t DateTime$hour(DateTime_t dt, OptionalText_t timezone); +Int_t DateTime$minute(DateTime_t dt, OptionalText_t timezone); +Int_t DateTime$second(DateTime_t dt, OptionalText_t timezone); +Int_t DateTime$nanosecond(DateTime_t dt, OptionalText_t timezone); Text_t DateTime$format(DateTime_t dt, Text_t fmt, OptionalText_t timezone); Text_t DateTime$date(DateTime_t dt, OptionalText_t timezone); Text_t DateTime$time(DateTime_t dt, bool seconds, bool am_pm, OptionalText_t timezone); |
