monday

monday, function

def const dash pure monday(d: date): date

Returns the Monday of the week containing d (inclusive).

Examples

table T = with
  [| as D |]
  [| date(2019, 12, 28) |]
  [| date(2019, 12, 30) |]
  [| date(2020, 1, 1) |]

show table "Monday" with
  T.D
  monday(T.D) as "WeekStart"

This produces the following table:

D WeekStart
2019-12-28 2019-12-23
2019-12-30 2019-12-30
2020-01-01 2019-12-30

See also

User Contributed Notes
0 notes + add a note