Log in

MonthYear Data Type

string

MonthYear represents a month and year pair in the format YYYYMM. Use-cases include instrument maturity and expiration.

For example, "202401" represents January 2024.

Perhaps counterintuitively, two additional formats are supported:

  • YYYYMMDD - allowing for 2 extra digits to specify the day of the month. In this case, LocalMktDate or UTCDateOnly is likely a better choice. It is also common to pair a MonthYear field with a DayOfMonth field.
  • YYYYMMWW - allowing for 2 extra digits to specify the week of the month, where WW is replaced by w1, w2, w3, w4, or w5.

Examples

ExampleValidNotes
202401
20241313 is not a valid month
20240101
202401w1
202401w6w6 is not a valid week