Skip to content

DateParts(year, month, day) Source

The year, the month and the day of each date, used by Array.from_date_parts.

Each part is an Array of whole numbers, as integers or as decimals such as 3.0, all of the same shape. The year is taken as written: 25 is the year 25.

Added in version 0.1.0

Parameters:

  • year (Array)

    The year of each date, from 1 to 9999.

  • month (Array)

    The month of each date, from 1 to 12.

  • day (Array)

    The day of each date, from 1 to the last day of its month.

Raises:

Examples:

import numdaplot as ndp

years = ndp.Array.from_list([2025, 2025])
months = ndp.Array.from_list([3, 12])
days = ndp.Array.from_list([15, 31])
ndp.Array.from_date_parts(ndp.DateParts(year=years, month=months, day=days))
# Array(['2025-03-15', '2025-12-31'], dtype=DATE)