Skip to content

Modern Chrono LocalDate DayOfWeek

Paul Squires edited this page Oct 19, 2026 · 5 revisions

Home › Date and Time (Chrono) › Chrono Date and Time › LocalDate.DayOfWeek

LocalDate.DayOfWeek

Returns the day of the week, 1 for Monday to 7 for Sunday.

Syntax

LocalDate.DayOfWeek

Examples

#import "std/chrono"
using chrono

'' ISO NUMBERING: Monday is 1 through Sunday is 7. NOT the 0-based
'' Sunday-first convention that WEEKDAY and most C code use.
dim as LocalDate d = LocalDate( 2026, 8, 13 )
print d.DayOfWeek            '' 4 -- a Thursday

print LocalDate( 2026, 8, 16 ).DayOfWeek       '' 7 -- Sunday
print LocalDate( 2026, 8, 17 ).DayOfWeek       '' 1 -- Monday

'' Day 0 of the calendar, 0001-01-01, is a Monday, which is where the
'' numbering comes from. IsoWeek depends on this convention.

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

Clone this wiki locally