Gentee Programming Language > Documentation > Libraries Download documentation

Function for working with time

  • Types
  • Operations
  • Methods
  • Functions for working with time of files
  • Functions

    Types

    An object of the datetime type is used to work with time. This type can contain information about date and time. The filetime type is used to work with time of files.
     
    type datetime {
          ushort   year
          ushort   month
          ushort   dayofweek
          ushort   day
          ushort   hour
          ushort   minute
          ushort   second
          ushort   msec
    }

    Fields

    yearYear.
    monthMonth.
    dayofweekWeekday. Counted from 0.
    0 is Sunday, 1 is Monday...
    dayDay.
    hourHours.
    minuteMinutes.
    secondSeconds.
    msecMilliseconds.

    Operations

    Operations defined for the variable of datetype type are listed below. The second column contains possible statements where typename is a variable or an expression of the specified type.
     
    OperationSyntaxReturn typeComments
    =datetime = datetimedatetimeOperations for setting time.
    +=datetime += uintdatetimeAdding days to a date.
    -=datetime -= uintdatetimeSubtracting days from a date.
    -datetime - datetimedatetimeDifference between two dates as days and time. All values are positive numbers.
    -=datetime -= datetimedatetime-
    ==datetime == datetimeuintComparison operations.
    !=datetime != datetimeuint-
    <datetime < datetimeuint-
    >datetime > datetimeuint-
    <=datetime <= datetimeuint-
    >=datetime >= datetimeuint-
    =filetime = filetimefiletimeOperations for setting time for files.
    ==filetime == filetimeuintOperation for comparing time of files.
    !=filetime != filetimeuint-
    <filetime < filetimeuint-
    >filetime > filetimeuint-
    <=filetime <= filetimeuint-
    >=filetime >= filetimeuint-

    Methods

    datetime.dayofyearDay in the year
    datetime.dayofweekWeekday
    datetime.gettimeGetting the current date and time
    datetime.setdateSpecifying a date

    Functions for working with time of files

    datetimetoftimeConverting date from datetime into filetime
    ftimetodatetimeConverting date from filetime into datetime
    getfiledatetimeGetting date and time as strings

    Functions

    abbrnameofdayWeekday name
    daysNumber of days between dates
    daysinmonthThe number of days in a month
    firstdayofweekThe first day in a week
    getdateformatConverting date into a string
    getdatetimeGetting date and time as strings
    gettimeformatConverting time into a string
    isleapyearLeap year check
    nameofmonthMonth name


     Copyright © 2004-2006 Gentee Inc. All rights reserved.