Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Update list of unported functions

...

Info
titleEngine Compatibility

This library has time:atom() and time:compare() have not yet been ported to the New Pico Engine. However, time:now() exists which returns the current time as a ISO8601 string (ex. "2017-03-08T22:45:18.887Z")


The time library provides functions for determining the time and manipulating time values. KRE tries to determine the user's location and creates a time object that is localized for the user (i.e., in the user's time zone). The following functions are available:

  • time:now() – returns the current date and time based as a ISO8601 string (ex. "2017-03-08T22:45:18.887Z") based upon the user's location data.
  • time:new() – returns a new RFC 3339 datetime string from a string formatted as described in ISO8601 (v2000).
  • time:add() – adds (or subtracts) a specific number of time units to a source string.

  • time:strftime() – returns a datetime string in a specified format following POSIX strftime conventions.
  • time:atom() – converts a datetime string to an ATOM compatible form.
  • time:compare() – takes two datetime strings (ISO8601) and returns 1, 0, or -1, depending on whether the first is before, the same, or after the second.

...