X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fceph%2Fsrc%2Fcommon%2Fiso_8601.h;fp=src%2Fceph%2Fsrc%2Fcommon%2Fiso_8601.h;h=0000000000000000000000000000000000000000;hb=7da45d65be36d36b880cc55c5036e96c24b53f00;hp=38de82848e7d21c82544b46fd47bf3012c485a1f;hpb=691462d09d0987b47e112d6ee8740375df3c51b2;p=stor4nfv.git diff --git a/src/ceph/src/common/iso_8601.h b/src/ceph/src/common/iso_8601.h deleted file mode 100644 index 38de828..0000000 --- a/src/ceph/src/common/iso_8601.h +++ /dev/null @@ -1,43 +0,0 @@ -// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- -// vim: ts=8 sw=2 smarttab - -#ifndef CEPH_COMMON_ISO_8601_H -#define CEPH_COMMON_ISO_8601_H - -#include - -#include "common/ceph_time.h" - -namespace ceph { - -// Here, we support the W3C profile of ISO 8601 with the following -// restrictions: -// - Subsecond resolution is supported to nanosecond -// granularity. Any number of digits between 1 and 9 may be -// specified after the decimal point. -// - All times must be UTC. -// - All times must be representable as a sixty-four bit count of -// nanoseconds since the epoch. -// - Partial times are handled thus: -// * If there are no subseconds, they are assumed to be zero. -// * If there are no seconds, they are assumed to be zero. -// * If there are no minutes, they are assumed to be zero. -// * If there is no time, it is assumed to midnight. -// * If there is no day, it is assumed to be the first. -// * If there is no month, it is assumed to be January. -// -// If a date is invalid, boost::none is returned. - -boost::optional from_iso_8601( - boost::string_ref s, const bool ws_terminates = true) noexcept; - -enum class iso_8601_format { - Y, YM, YMD, YMDh, YMDhm, YMDhms, YMDhmsn -}; - -std::string to_iso_8601(const ceph::real_time t, - const iso_8601_format f = iso_8601_format::YMDhmsn) - noexcept; -} - -#endif