pjs.getDayOfWeek()
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 CEEDYWK.
For new code, it’s recommended to use standard JS Date methods and/or 3rd party Node.js libraries.
This API converts a Lilian date into a number 1-7 which represents the day of the week. 1=Sunday, 7=Saturday.
An exception will be thrown for any error.
Parameters
Days (number). An integer representing the number of days since 14 October 1582. Must be in the range 1 to 3074324.
Week day (field name) a numeric field name defined with
pjs.define()
that will receive the day of the week number.
Example
pjs.define("out_day", { type: 'integer', length: 10, decimals: 0 });
pjs.getDayOfWeek(163544, out_day);
console.log(out_day); // 1
Looking for labels? They can now be found in the details panel on the floating action bar.