Interface DatetimeNamespace

DateTime functions for Lazy dataframes

interface DatetimeNamespace {
    day(): pl.Expr;
    hour(): pl.Expr;
    minute(): pl.Expr;
    month(): pl.Expr;
    nanosecond(): pl.Expr;
    ordinalDay(): pl.Expr;
    second(): pl.Expr;
    strftime(fmt: string): pl.Expr;
    timestamp(): pl.Expr;
    week(): pl.Expr;
    weekday(): pl.Expr;
    year(): pl.Expr;
}

Hierarchy

  • DateFunctions<pl.Expr>
    • DatetimeNamespace

Methods

  • Extract day from underlying Date representation. Can be performed on Date and Datetime.

    Returns the day of month starting from 1. The return value ranges from 1 to 31. (The last day of month differs by months.)

    Returns pl.Expr

    day as pl.UInt32

  • Extract hour from underlying DateTime representation. Can be performed on Datetime.

    Returns the hour number from 0 to 23.

    Returns pl.Expr

    Hour as UInt32

  • Extract minutes from underlying DateTime representation. Can be performed on Datetime.

    Returns the minute number from 0 to 59.

    Returns pl.Expr

    minute as UInt32

  • Extract month from underlying Date representation. Can be performed on Date and Datetime.

    Returns the month number starting from 1. The return value ranges from 1 to 12.

    Returns pl.Expr

    Month as UInt32

  • Extract seconds from underlying DateTime representation. Can be performed on Datetime.

    Returns the number of nanoseconds since the whole non-leap second. The range from 1,000,000,000 to 1,999,999,999 represents the leap second.

    Returns pl.Expr

    Nanosecond as UInt32

  • Extract ordinal day from underlying Date representation. Can be performed on Date and Datetime.

    Returns the day of year starting from 1. The return value ranges from 1 to 366. (The last day of year differs by years.)

    Returns pl.Expr

    Day as UInt32

  • Extract seconds from underlying DateTime representation. Can be performed on Datetime.

    Returns the second number from 0 to 59.

    Returns pl.Expr

    Second as UInt32

  • Extract the week from the underlying Date representation. Can be performed on Date and Datetime

    Returns the ISO week number starting from 1. The return value ranges from 1 to 53. (The last week of year differs by years.)

    Returns pl.Expr

    Week number as UInt32

  • Extract the week day from the underlying Date representation. Can be performed on Date and Datetime.

    Returns the weekday number where monday = 0 and sunday = 6

    Returns pl.Expr

    Week day as UInt32

  • Extract year from underlying Date representation. Can be performed on Date and Datetime.

    Returns the year number in the calendar date.

    Returns pl.Expr

    Year as Int32