util.Datetime methods

util.Datetime class provides a set of methods that can be used with variables of the DATETIME data type.

These methods are applied to the currently run application and do not need to be instantiated.

util.Datetime class is one of Lycia build-in classes. You don't need to import any additional packages to your application to make them work.

Available methods

util.Datetime.format()

formats a DATETIME value according to the specified format

util.Datetime.fromSecondsSinceEpoch()

converts a number of seconds since Unix epoch to a DATETIME value

util.Datetime.getCurrentAsLocal()

returns current date and time as a DATETIME value in the local time zone

util.Datetime.getCurrentAsUTC()

returns current date and time as UTC

util.Datetime.parse()

converts a string into a DATETIME value according to the specified format

util.Datetime.toLocalTime()

converts a DATETIME value in UTC to the DATETIME value in the local time zone

util.Datetime.toSecondsSinceEpoch()

converts a DATETIME value to a FLOAT value showing number of seconds since Unix epoch

util.Datetime.toUTC()

converts a local time zome DATETIME value to UTC

 

Contact Us

Privacy Policy

Copyright © 2024 Querix, (UK) Ltd.