<<date>>


2 0 Proposed by Amaury Bouchard, @geekcto

Content

Description

Write a date and/or time string, from a given date (or the current date/time of no special date is given) and a format string.

Could be useful for generated documents that need a date.

Parameters

  1. A date format string, like the one accepted by the strftime C function.

  2. Optional, by default takes the current time. It could be an Unix timestamp, or a parseable string.

Code example

Print the current date

<<date | %Y-%m-%d>>

Print the date corresponding to a given timestamp

<<date | %Y-%m-%d | 1358709717>>
2013-01-20

Comments

Written by Renaud, @marmotz on 2013-03-09

Very good idea !

Written by Régis, @regisenguehard on 2013-03-10

Bonne idée

New comment

Mandatory - Will be public
Mandatory - Won't appear
Optional - Will be public
Optional - Will be public
SkrivML
Please, fill all needed fields before submitting the form.