The DateTime
value to reference.
atBeginningOfWeek
atBeginningOfWeek(dateTime: DateTime): DateTime
Returns a new DateTime
value that changes the Day
and Time
values from the
input to the beginning of the first day of the specified week.
The function treats Sunday as the first day of the week.
Introduced in DataWeave version 2.4.0.
Example
This example changes the Day
and Time
values (06T18:23:20.351
) within
the DateTime
input to the beginning of the first day of the specified week
(04T00:00:00
).
atBeginningOfWeek(localDateTime: LocalDateTime): LocalDateTime
Returns a new LocalDateTime
value that changes the Day
and Time
values from the
input to the beginning of the first day of the specified week.
The function treats Sunday as the first day of the week.
Introduced in DataWeave version 2.4.0.
Example
This example changes the Day
and Time
values (06T18:23:20.351
) within
the LocalDateTime
input to the beginning of the first day of the specified week
(04T00:00:00
).
atBeginningOfWeek(date: Date): Date
Returns a new Date
value that changes the Date
input
input to the first day of the specified week.
The function treats Sunday as the first day of the week.
Introduced in DataWeave version 2.4.0.
Example
This example changes the Day
value (06
) within
the Date
input to the first day of the week that contains 2020-10-06
(a Tuesday), which is 2020-10-04
(a Sunday).
The Day
value changes from 06
to 04
.