Cookiecutter: Add current date

Created on 10 Feb 2017  路  2Comments  路  Source: cookiecutter/cookiecutter

How to add current date as option?

question

Most helpful comment

Hi @artemnovichkov! 馃憢

You can insert the current date and time using jinja2-time, which comes with cookiecutter.

{% now 'utc', '%Y' %}

Check out this example.

All 2 comments

Hi @artemnovichkov! 馃憢

You can insert the current date and time using jinja2-time, which comes with cookiecutter.

{% now 'utc', '%Y' %}

Check out this example.

@hackebrot, thank you! I used {% now 'local', '%d/%m/%Y' %} for similar date format.

Was this page helpful?
0 / 5 - 0 ratings