Skip to content

datetime

sanya_fritz edited this page Apr 20, 2024 · 1 revision

Documentation for the datetime namespace

This library provides classes and functions for working with date and time.

Classes

DateTime

Represents a date and time.

Constructor

  • DateTime(int year, int month, int day, int hour, int minute, int second): Constructs a DateTime object with the specified year, month, day, hour, minute, and second.
  • DateTime(const ponystring& datetimeStr): Constructs a DateTime object from a string representation in the format "YYYY-MM-DD HH:MM:SS".

Member Functions

  • ponystring toString(): Converts the DateTime object to a string representation in the format "YYYY-MM-DD HH:MM:SS".

Functions

  • DateTime now(): Returns the current date and time.
  • DateTime today(): Returns the current date with the time set to midnight.

Clone this wiki locally