Package Overview

The Date package provides an API to manipulate PrgT_Date objects. These objects represent a specific date and time as the number of seconds since midnight on 1 January 1970 GMT. Except where stated otherwise, all calculations are performed assuming local time; no time zone conversions occur.

prg_date_current_get() returns the current date and time.

You can perform various conversions on PrgT_Date objects:

You can add an offset (in seconds) to a time with prg_date_offset_add() or offset the time by a specific interval (such as an hour or a day) with prg_date_interval_offset_add(). To get the difference between two times, use prg_date_offset_get().

prg_date_time_window_calculate() will compute a time window of a requested size relative to a specified time.

Several utility functions perform operations that can simplify time-based computations: prg_date_month_number_determine(), prg_date_timezone_get(), and prg_date_utc_compute().