dayOfWeekISO
Returns the day of the week in ISO 8601 format, ranging from 1 (for Monday) to 7 (for Sunday).
To get the current week number, see weekISO.
The accepted date types are Instant, ObjectId and Timestamp.
Example
class User(
val name: String,
val birthdate: Instant,
val birthdayOfWeekISO: Int? = null,
)
users.updateManyWithPipeline {
set {
User::birthdayOfWeekISO set User::birthdate.dayOfWeekISO
}
}Content copied to clipboard