Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/iris/coord_categorisation.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def add_day_of_year(cube, coord, name="day_of_year"):
def add_weekday_number(cube, coord, name="weekday_number"):
"""Add a categorical weekday coordinate, values 0..6 [0=Monday]."""
add_categorised_coord(
cube, name, coord, lambda coord, x: _pt_date(coord, x).weekday()
cube, name, coord, lambda coord, x: _pt_date(coord, x).dayofwk
)


Expand All @@ -192,7 +192,7 @@ def add_weekday_fullname(cube, coord, name="weekday_fullname"):
cube,
name,
coord,
lambda coord, x: calendar.day_name[_pt_date(coord, x).weekday()],
lambda coord, x: calendar.day_name[_pt_date(coord, x).dayofwk],
units="no_unit",
)

Expand All @@ -203,7 +203,7 @@ def add_weekday(cube, coord, name="weekday"):
cube,
name,
coord,
lambda coord, x: calendar.day_abbr[_pt_date(coord, x).weekday()],
lambda coord, x: calendar.day_abbr[_pt_date(coord, x).dayofwk],
units="no_unit",
)

Expand Down