monthEnd

monthEnd, function

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

Returns the last day of the month containing d.

Examples

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

show table "Month end" with
  T.D
  monthEnd(T.D) as "End"

This produces the following table:

D End
2019-12-28 2019-12-31
2019-12-30 2019-12-31
2020-01-01 2020-01-31

See also

User Contributed Notes
0 notes + add a note