Skip to content

Modern Chrono DateTime PrevWeekday

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

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

DateTime.PrevWeekday

Returns the same time on the previous given weekday, always strictly earlier.

Syntax

DateTime.PrevWeekday( dow )

Examples

#import "std/chrono"
using chrono

dim as DateTime d = DateTime( 2026, 8, 13, 14, 30, 5, 123 )
'' The previous Monday, strictly before this value
print d.PrevWeekday( DT_MONDAY ).ToIsoString( )     '' 2026-08-10T14:30:05.1230000

'' Strictly before, so a value already on a Monday goes back a full week

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

Clone this wiki locally