Şablon:Year decimal

Wikipediýa, erkin ensiklopediýa

2024.3689

Şablon resminamasy

Computes the date and time as a "decimal year", which is useful for timeline or graph templates which don't naturally parse dates and times. The default is to use the current time, but the template can parse any date string supported by Time parser function.

Usage

Decimal year for the last time the page cache was refreshed:

  • {{Year decimal}} → 2024.3689

Decimal year for January 3, 2015

  • {{Year decimal|January 3, 2015}} → 2015.0055

Two weeks before January 3, 2015

  • {{Year decimal|January 3, 2015 -2 weeks}} → 2014.9671

Increasing the precision

  • {{Year decimal|January 3, 2015 -2 weeks|r=8}} → 2014.96712329