Date is only available as object
It' save always Date + Time
Default date is the company Date
let a=new Date(); // the current Date + Time
or via global function Date()
let a=Date(); // return current company Date + Time as object
Define Date:
Date(year,month,day,hh,mm,ss) It's working with 1-6 parameters
Date(String) Convert String to DateTime. Best Format is yyyy/mm/dd hh:mm:ss
Methods
Method |
Description |
|
toString(x) toDateString(x) |
||
dbString() |
||
getFullYear() |
return year as number |
|
getMonth() |
return month as number |
|
getDay() |
return day as number |
|
getHours() |
return hour as number |
|
getMinutes() |
return minute as number |
|
getSeconds() |
return seconds as number |
|
timeToSec() |
|
|
getMonthName() |
|
|
getWeekDayName() |
Return Week day Name as String WordId |
|
getWeekDay() |
|
|
nextWeekDay(x) |
||
toJulianDate |
Date Operations
Method |
Description |
|
bod(), eod() |
Return Begin of Date and End of Date as DateTime |
|
bom(),eom() |
Return Begin of Month with time 0:00, End of Month with time 23:59 |
|
boy(),eoy() |
Return Begin of Year with time 0:00, End of Year with time 23:59 |
|
addSeconds(x) |
Increase/Decrease Date with defined Seconds |
|
addMinutes(x) |
Increase/Decrease Date with defined Minutes |
|
addHours(x) |
Increase/Decrease Date with defined Hours |
|
addDays(x) |
|
|
addWorkDays(x) |
|
|
addMonth(x) |
|
|
addYears(x) |
not supported |
|
dayTemplate() |
Return the day Template as String based on company calender |
|
dayWorkPercent() |
Return Work day in Percent |
|
isWorkDay() |
|
|
isResourceWorkDay() |
Return if this is a work day for a resource. Return boolean |
|
dayInfo() |
Return Company Info from current date |
|
dayResourcePercent() |
Return Work day Percent from Resource Calender |
Week functions
Method |
Description |
bow() |
|
eof() |
|
toWeek() |
|
toYeearWeek() |
Additional functions, not related to current value
Method |
Description |
cpu() |
return CPU time (milliseconds since start of the computer) as number |
secToTimeString(x) |
|
secondsBetweenDates(x,y) |
|
workdaysBetweenDates(x,y) |
|
daysBetweenDates(x,y) |