OLD | NEW |
1 // Protocol Buffers - Google's data interchange format | 1 // Protocol Buffers - Google's data interchange format |
2 // Copyright 2008 Google Inc. All rights reserved. | 2 // Copyright 2008 Google Inc. All rights reserved. |
3 // https://developers.google.com/protocol-buffers/ | 3 // https://developers.google.com/protocol-buffers/ |
4 // | 4 // |
5 // Redistribution and use in source and binary forms, with or without | 5 // Redistribution and use in source and binary forms, with or without |
6 // modification, are permitted provided that the following conditions are | 6 // modification, are permitted provided that the following conditions are |
7 // met: | 7 // met: |
8 // | 8 // |
9 // * Redistributions of source code must retain the above copyright | 9 // * Redistributions of source code must retain the above copyright |
10 // notice, this list of conditions and the following disclaimer. | 10 // notice, this list of conditions and the following disclaimer. |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 // Formats a time string in RFC3339 fromat. | 59 // Formats a time string in RFC3339 fromat. |
60 // | 60 // |
61 // For example, "2015-05-20T13:29:35.120Z". For nanos, 0, 3, 6 or 9 fractional | 61 // For example, "2015-05-20T13:29:35.120Z". For nanos, 0, 3, 6 or 9 fractional |
62 // digits will be used depending on how many are required to represent the exact | 62 // digits will be used depending on how many are required to represent the exact |
63 // value. | 63 // value. |
64 // | 64 // |
65 // Note that "nanos" must in the range of [0, 999999999]. | 65 // Note that "nanos" must in the range of [0, 999999999]. |
66 string LIBPROTOBUF_EXPORT FormatTime(int64 seconds, int32 nanos); | 66 string LIBPROTOBUF_EXPORT FormatTime(int64 seconds, int32 nanos); |
67 // Parses a time string. This method accepts RFC3339 date/time string with UTC | 67 // Parses a time string. This method accepts RFC3339 date/time string with UTC |
68 // offset. For example, "2015-05-20T13:29:35.120-08:00". | 68 // offset. For example, "2015-05-20T13:29:35.120-08:00". |
69 bool LIBPROTOBUF_EXPORT ParseTime(const string& value, int64* seconds, int32* na
nos); | 69 bool LIBPROTOBUF_EXPORT ParseTime(const string& vaule, int64* seconds, int32* na
nos); |
70 | 70 |
71 } // namespace internal | 71 } // namespace internal |
72 } // namespace protobuf | 72 } // namespace protobuf |
73 } // namespace google | 73 } // namespace google |
74 | 74 |
75 #endif // GOOGLE_PROTOBUF_STUBS_TIME_H_ | 75 #endif // GOOGLE_PROTOBUF_STUBS_TIME_H_ |
OLD | NEW |