pjs.fromLilianSeconds()
This API was added in version 7.17.0
This API is intended primarily for RPG to JavaScript code transformation scenarios, and provides a drop-in alternative to CEEDATM.
For new code, it’s recommended to use standard JS Date methods and/or 3rd party Node.js libraries.
This API converts a number which represents the number of seconds since 14 October 1582 to a date/time string.
An exception will be thrown for any error.
Parameters
Seconds (number). A number representing the number of seconds since 14 October 1582. Must be in the range 86400 to 265621679999.999.
Date/time format (string). A string representing the format of the date/time string to output. Valid formats are:
Www, DD-Mmm-YYYY HH:MI:SSDate/time (field name) a character field name defined with
pjs.define()that will receive the date/time string.
Example
pjs.define("out", { type: 'char', length: 50, varying: true });
pjs.fromLilianSeconds(12799191601.12, 'Www, DD-Mmm-YYYY HH:MI:SS', out);
console.log(out); // Mon, 16-May-1988 19:00:01