v2026.4.1
All Bundles

DateUtility

Utilities for handling dates

date := DateUtility->Parse("12/25/2024", "MM/dd/yyyy", false);
date->GetMonth()->PrintLine();
date->GetDay()->PrintLine();
date->GetYear()->PrintLine();

Operations

Format

Formats date into a string

function : Format(date:System.Time.Date, format:String) ~ String

Parameters

NameTypeDescription
dateDatedate
formatStringdate string format

options:

  • month=MM
  • day=dd
  • year=yy(yy)
  • hour=hh
  • minutes=mm
  • seconds=ss

    Return

    TypeDescription
    StringDate instance

    GetNetworkTime

    Get the network time

    function : GetNetworkTime() ~ Collection.Tuple.Triplet<IntRef,Date,Date>

    Return

    TypeDescription
    CollectionTupleTriplet<IntRef,Date,Date>triplet with: unix time, UTC time and local time

    Parse

    Parses a date from a String.

    function : Parse(date_str:String, format:String, gmt:Bool) ~ Date

    Parameters

    NameTypeDescription
    date_strStringdate
    formatStringdate string format

    options:

    • month=MM
    • day=dd
    • year=yy(yy)
    • hour=hh
    • minutes=mm
    • seconds=ss

      gmtBooltrue is GMT, false otherwise

      Return

      TypeDescription
      DateDate instance