Skip to content

Modern Chrono DateTime WeeksInYear

Paul Squires edited this page Oct 19, 2026 · 1 revision

Home › Date and Time (Chrono) › Chrono Date and Time › DateTime.WeeksInYear

DateTime.WeeksInYear

Returns 52 or 53, the number of ISO weeks in a year.

Syntax

DateTime.WeeksInYear( y )

Examples

#import "std/chrono"
using chrono

'' 52 or 53, depending on which weekdays the year starts and ends on
print DateTime.WeeksInYear( 2026 )      '' 53
print DateTime.WeeksInYear( 2025 )      '' 52

'' A static: it is a property of the YEAR, not of a particular moment

Library: Chrono Date and Time
Category: Date and Time (Chrono)
Documented under: The Members

Clone this wiki locally