ocean.text.convert.DateTime

Module that provides a method to convert from a date time formatted as a string to a UNIX timestamp value.

Members

Enums

DateConversion
enum DateConversion

Type of date conversion that has been applied

Functions

timeToUnixTime
bool timeToUnixTime(cstring str, time_t time, DateConversion conversion_type)

Given a timestamp, if it belongs to a set of supported formats, return the equivalent unix timestamp. Refer to the 'DateConversion' enum for the list of supported formats.

validateDate
bool validateDate(uint day, uint month, uint year)

Check that the date has valid values for days, months, and years.

validateTime
bool validateTime(int hour, int minute, int second)

Check that the time has valid values for hour, minute, and second.

Meta

License

Boost Software License Version 1.0. See LICENSE_BOOST.txt for details. Alternatively, this file may be distributed under the terms of the Tango 3-Clause BSD License (see LICENSE_BSD.txt for details).