date_format

Creator: coderz1093

Last updated:

0 purchases

date_format Image
date_format Images

Languages

Categories

Add to Cart

Description:

date format

date_format #
A simple API to format dates.
Usage #
Use formatDate function to format a DateTime object.
print(formatDate(DateTime(1989, 02, 21), [yyyy, '-', mm, '-', dd]));
copied to clipboard
Output:

1989-02-21

Long month names #
print(formatDate(DateTime(1989, 2, 21), [yy, '-', M, '-', d]));
copied to clipboard
Output:

89-feb-21

Time parts #
print(formatDate(
DateTime(1989, 02, 1, 15, 40, 10), [HH, ':', nn, ':', ss]));
copied to clipboard
Output:

15:40:10

Timezone #
print(formatDate(
DateTime(1989, 02, 1, 15, 40, 10), [HH, ':', nn, ':', ss, z]));
copied to clipboard
Output:

15:40:10+0100

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.