|
dxFeed Graal CXX API v9.0.0
|
Utility class for parsing and formatting dates and times in ISO-compatible format. More...
#include <TimeFormat.hpp>
Public Member Functions | |
| const JavaObjectHandle< TimeFormat > & | getHandle () const |
| std::int64_t | parse (StringParam value) const |
| Reads Date from String and returns timestamp. | |
| std::string | format (std::int64_t timestamp) const |
| Converts timestamp into string according to the format. | |
Static Public Attributes | |
| static const TimeFormat | DEFAULT |
| An instance of TimeFormat that corresponds to default timezone as returned by TimeZone::getDefault() method. | |
| static const TimeFormat | DEFAULT_WITH_MILLIS |
| The same as DEFAULT, with milliseconds. | |
| static const TimeFormat | DEFAULT_WITH_MILLIS_WITH_TIMEZONE |
| The same as DEFAULT, with milliseconds and the timezone. | |
| static const TimeFormat | GMT |
| An instance of TimeFormat that corresponds to GMT timezone as returned by Java TimeZone.getTimeZone("GMT"). | |
Utility class for parsing and formatting dates and times in ISO-compatible format.
Some methods that are not marked noexcept may throw exceptions:
| InvalidArgumentException | if handle is invalid. |
| JavaException | if something happened with the dxFeed API backend |
| GraalException | if something happened with the GraalVM |
| std::string TimeFormat::format | ( | std::int64_t | timestamp | ) | const |
Converts timestamp into string according to the format.
| timestamp | The date and time timestamp. |
| const JavaObjectHandle< TimeFormat > & TimeFormat::getHandle | ( | ) | const |
| std::int64_t TimeFormat::parse | ( | StringParam | value | ) | const |
Reads Date from String and returns timestamp.
This method is designed to understand ISO 8601 formatted date and time. It accepts the following formats:
Here
| value | String value to parse. |