Please add a datetimeformat mask that returns epoch time

Description

It would be very helpful for dateTimeFormat() to have a mask option to return epoch time for a given datetime rather than trying to hunt down the java function or write a UDF that does that. I don't know java (at all). I've been a CF user since the Allaire days. When I want to format a datetime in a specific format, I go to the datetimeformat() function first, and epoch time is just another datetime format. Because java should do most of the heavy lifting for you, it should be quick for you to implement something like the following:

```
if (mask == 'epoch'){
return inputDate.getTime()/1000;
} else if (mask == 'epochMS'){
return inputDate.getTime();
}
```

Please see this thread for more detail, and thank you for all that you do! Lucee is so much better than ACF!: https://dev.lucee.org/t/please-add-a-datetimeformat-mask-that-returns-epoch-time/5921/7

Status

Assignee

Michael Offner

Reporter

Daemach Laratin

Labels

None

Affects versions

5.3.3.14

Priority

New
Configure