common_util
Loading...
Searching...
No Matches
Classes | Enumerations | Functions
datetime.h File Reference

A simple, feature-rich modern C++ date-time class. More...

#include <cstdint>
#include <string>
#include <iostream>
#include <regex>
#include <vector>
#include <utility>

Go to the source code of this file.

Classes

class  cutl::datetime
 A simple, feature-rich modern C++ date-time class. More...
 

Enumerations

enum class  cutl::datetime_format { datetime_format_a , datetime_format_b , datetime_format_c , datetime_format_d }
 the string datetime format for parsing and formatting More...
 

Functions

std::ostream & cutl::operator<< (std::ostream &os, const datetime &dt)
 Define the output stream operator for datetime object.
 

Detailed Description

A simple, feature-rich modern C++ date-time class.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations.

Author
spencer.luo
Date
2024-05-13

Enumeration Type Documentation

◆ datetime_format

enum class cutl::datetime_format
strong

the string datetime format for parsing and formatting

Enumerator
datetime_format_a 

YYYY-MM-DD HH:MM:SS.sss

datetime_format_b 

YYYY.MM.DD HH:MM:SS

datetime_format_c 

YYYY/MM/DD HH:MM:SS

datetime_format_d 

YYYYMMDD HH:MM:SS

Function Documentation

◆ operator<<()

std::ostream & cutl::operator<< ( std::ostream & os,
const datetime & dt )

Define the output stream operator for datetime object.

Parameters
osthe std::ostream object
dtthe datetime object to be output
Returns
std::ostream& the reference of the std::ostream object after outputting the datetime object