- public DateTime add (TimeSpan timespan)
Creates a copy of this and adds the
specified timespan to the copy.
- public DateTime add_years (int years)
Creates a copy of this and adds the
specified number of years to the copy.
- public DateTime add_months (int months)
Creates a copy of this and adds the
specified number of months to the copy.
- public DateTime add_weeks (int weeks)
Creates a copy of this and adds the
specified number of weeks to the copy.
- public DateTime add_days (int days)
Creates a copy of this and adds the
specified number of days to the copy.
- public DateTime add_hours (int hours)
Creates a copy of this and adds the
specified number of hours.
- public DateTime add_minutes (int minutes)
Creates a copy of this adding the
specified number of minutes.
- public DateTime add_seconds (double seconds)
Creates a copy of this and adds the
specified number of seconds.
- public DateTime add_full (int years, int months, int days, int hours = 0, int minutes = 0, double seconds = 0)
Creates a new DateTime adding the specified
values to the current date and time in this.
- public int compare (DateTime dt)
A comparison function for DateTimes that is
suitable as a SearchFunc.
- public TimeSpan difference (DateTime begin)
Calculates the difference in time between
this and begin
.
- public uint hash ()
- public bool equal (DateTime dt)
Checks to see if dt1
and dt2
are equal.
- public void get_ymd (out int year, out int month, out int day)
Retrieves the Gregorian day, month, and year of a given
DateTime.
- public int get_year ()
Retrieves the year represented by this
in the Gregorian calendar.
- public int get_month ()
Retrieves the month of the year represented by
this in the Gregorian calendar.
- public int get_day_of_month ()
Retrieves the day of the month represented by
this in the gregorian calendar.
- public int get_week_numbering_year ()
Returns the ISO 8601 week-numbering year in which the week containing
this falls.
- public int get_week_of_year ()
Returns the ISO 8601 week number for the week containing
this.
- public int get_day_of_week ()
Retrieves the ISO 8601 day of the week on which
this falls (1 is Monday, 2 is Tuesday... 7 is Sunday).
- public int get_day_of_year ()
Retrieves the day of the year represented by
this in the Gregorian calendar.
- public int get_hour ()
Retrieves the hour of the day represented by
this
- public int get_minute ()
Retrieves the minute of the hour represented by
this
- public int get_second ()
Retrieves the second of the minute represented by
this
- public int get_microsecond ()
Retrieves the microsecond of the date represented by
this
- public double get_seconds ()
Retrieves the number of seconds since the start of the last minute,
including the fractional part.
- public int64 to_unix ()
Gives the Unix time corresponding to this
, rounding down to the nearest second.
- public bool to_timeval (out TimeVal tv)
Stores the instant in time that this
represents into tv
.
- public TimeSpan get_utc_offset ()
Determines the offset to UTC in effect at the time and in the time
zone of this.
- public unowned string get_timezone_abbreviation ()
Determines the time zone abbreviation to be used at the time and in
the time zone of this.
- public bool is_daylight_savings ()
Determines if daylight savings time is in effect at the time and in
the time zone of this.
- public DateTime to_timezone (TimeZone tz)
Create a new DateTime corresponding to the
same instant in time as this, but in the time zone tz
.
- public DateTime to_local ()
Creates a new DateTime corresponding to the
same instant in time as this, but in the local time zone.
- public DateTime to_utc ()
Creates a new DateTime corresponding to the
same instant in time as this, but in UTC.
- public string format (string format)
Creates a newly allocated string representing the requested
format
.
- public string to_string ()