Dotiac

 view release on metacpan or  search on metacpan

lib/Dotiac/DTL/Tag/now.pm  view on Meta::CPAN

B<This might change if a locale module is loaded.>

=item "n"

Returns the current month as a number without leading zeros.

	{% now "m" %} {# 1 #} to {# 12 #}

=item "M"

Returns the current in Associated Press style notation.

	{% now "M" %} {# Jan. #} {# March #} {# July #}

B<This might change if a locale module is loaded.>

=item "O"

Returns the difference to Greenwich time in hours.

	{% now "O" %} {# +0100 #}

=item "P"

Returns either the time in 12 hours and minutes if not zero with a.m. or p.m., midnight or noon.

	{% now "P" %} {# 1 p.m. #} {# 11:56 a.m. #} {# midnight #} {# noon #}

=item "r"

Returns an RFC 2822 formatted date.

	{% now "r" %} {# Sun, 28 Dec 2008 18:36:24 +0200' #}

B<This might change if a locale module is loaded.>

=item "s"

Returns the seconds with a leading zero.

	{% now "s" %} {# 00 #} to {# 59 #}

=item "S"

Returns the ordinal suffix for the day of the month.

	{% now "S" %} {# st #} {# nd #} {# rd #} {# th #}

Defaults to english, B<this may change if a locale module is loaded.>

=item "t"

Returns the number of days in the given month.

	{% now "t" %} {# 28 #} to  {# 31 #}

=item "T"

Returns the current timezone (needs the POSIX module)

	{% now "T" %} {# CET #} {# GMT #} {# EST #}...

=item "w"

Returns the day of week as a number from 0 (Sunday) to 6 (Saturday)

	{% now "w" %} {# 1 #} to {# 6 #}

=item "W"

Returns the ISO-8601 week number of year (uses the POSIX module), weeks start on monday.

	{% now "w" %} {# 1 #} to {# 53 #}

=item "y" 

Returns the year in two digits (with leading zeros) 

	{% now "y" %} {# 08 #}

=item "Y"

Returns the year in four (or more) digits (with leading zeros) 

	{% now "Y" %} {# 2008 #}

=item "z"

Returns the day of the year without leading zeros

	{% now "z" %} {# 0 #} to {# 365 #}

=item "Z"

Returns the difference of the current timezone to GMT in seconds.

	{% now "Z" %} {# -43200 #} to {# 43200 #}

=back

=head1 BUGS AND DIFFERENCES TO DJANGO

If you find any, please inform me about them.

=head1 SEE ALSO

L<http://www.djangoproject.com>, L<Dotiac::DTL>

=head1 LEGAL

Dotiac::DTL was built according to http://docs.djangoproject.com/en/dev/ref/templates/builtins/.

=head1 AUTHOR

Marc-Sebastian Lucksch

perl@marc-s.de

=cut



( run in 0.952 second using v1.01-cache-2.11-cpan-8f98c5d2c55 )