Skip to content

Commit aa139fb

Browse files
committed
chore(release): bump version to 0.3.0
1 parent c5cfdee commit aa139fb

File tree

4 files changed

+41
-13
lines changed

4 files changed

+41
-13
lines changed

CHANGELOG.md

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,11 @@
44

55
### Added
66

7-
- C-string constructors for `DateTime` and `DateTimeOffset` for convenient initialization from string literals
8-
- `std::initializer_list<const char*>` constructors for `DateTime` and `DateTimeOffset` for single-string initialization syntax
9-
- `DateTime::Format::Iso8601PreciseTrimmed` format option that removes trailing zeros from fractional seconds (e.g., `.1230000Z``.123Z`, `.1000000Z``.1Z`) while maintaining full ISO 8601:2019 §5.3.4.2 compliance
10-
- `DateTime::Format::Iso8601Millis` format option for fixed 3-digit millisecond precision (e.g., `.123Z`, `.000Z`)
11-
- `DateTime::Format::Iso8601Micros` format option for fixed 6-digit microsecond precision (e.g., `.123456Z`, `.000000Z`)
7+
- NIL
128

139
### Changed
1410

15-
- **BREAKING**: DateTime::Format enum values renamed (`Iso8601WithOffset``Iso8601Extended`, `Iso8601Compact``Iso8601Basic`) to align with ISO 8601 terminology
11+
- NIL
1612

1713
### Deprecated
1814

@@ -30,6 +26,23 @@
3026

3127
- NIL
3228

29+
## [0.3.0] - 2026-01-11
30+
31+
### Added
32+
33+
- C-string constructors for `DateTime` and `DateTimeOffset` for convenient initialization from string literals
34+
- `std::initializer_list<const char*>` constructors for `DateTime` and `DateTimeOffset` for single-string initialization syntax
35+
- `DateTime::Format::Iso8601PreciseTrimmed` format option that removes trailing zeros from fractional seconds (e.g., `.1230000Z``.123Z`, `.1000000Z``.1Z`) while maintaining full ISO 8601:2019 §5.3.4.2 compliance
36+
- `DateTime::Format::Iso8601Millis` format option for fixed 3-digit millisecond precision (e.g., `.123Z`, `.000Z`)
37+
- `DateTime::Format::Iso8601Micros` format option for fixed 6-digit microsecond precision (e.g., `.123456Z`, `.000000Z`)
38+
39+
### Changed
40+
41+
- **BREAKING**: DateTime::Format enum values renamed (`Iso8601WithOffset``Iso8601Extended`, `Iso8601Compact``Iso8601Basic`) to align with ISO 8601 terminology
42+
43+
44+
45+
3346
## [0.2.0] - 2026-01-05
3447

3548
### Changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
cmake_minimum_required(VERSION 3.20)
1010

1111
project(nfx-datetime
12-
VERSION 0.2.0
12+
VERSION 0.3.0
1313
DESCRIPTION "Cross-platform C++ DateTime library with 100-nanosecond precision and ISO 8601 support"
1414
HOMEPAGE_URL "https://github.com/nfx-libs/nfx-datetime"
1515
LANGUAGES CXX

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# MIT License
22

3-
Copyright (c) 2025 nfx
3+
Copyright (c) 2025-2026 nfx
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ nfx-datetime is a modern C++20 library providing high-precision temporal operati
2929
- Full ISO 8601 parsing and formatting support
3030
- Basic format: `20250124T054200Z`
3131
- Extended format: `2025-01-24T05:42:00Z`
32+
- Precision formats:
33+
- Full precision: `2025-01-24T05:42:00.1234567Z` (100-nanosecond ticks)
34+
- Trimmed: `2025-01-24T05:42:00.123Z` (trailing zeros removed)
35+
- Milliseconds: `2025-01-24T05:42:00.123Z` (3-digit fixed)
36+
- Microseconds: `2025-01-24T05:42:00.123456Z` (6-digit fixed)
3237
- Timezone offsets: `2025-01-24T05:42:00+02:00`
3338
- Duration format: `P1DT2H30M` (1 day, 2 hours, 30 minutes)
3439

@@ -221,8 +226,13 @@ TimeSpan oneHour = TimeSpan::fromHours(1);
221226
DateTime later = dt1 + oneHour;
222227

223228
// Formatting
224-
std::string iso = dt1.toString(DateTime::Format::Iso8601); // "2025-01-24T05:42:00Z"
225-
std::string precise = dt1.toString(DateTime::Format::Iso8601Precise); // "2025-01-24T05:42:00.0000000Z"
229+
std::string iso = dt1.toString(DateTime::Format::Iso8601); // "2025-01-24T05:42:00Z"
230+
std::string precise = dt1.toString(DateTime::Format::Iso8601Precise); // "2025-01-24T05:42:00.0000000Z"
231+
std::string trimmed = dt1.toString(DateTime::Format::Iso8601PreciseTrimmed); // "2025-01-24T05:42:00.0Z" (trailing zeros removed)
232+
std::string millis = dt1.toString(DateTime::Format::Iso8601Millis); // "2025-01-24T05:42:00.000Z" (3-digit fixed)
233+
std::string micros = dt1.toString(DateTime::Format::Iso8601Micros); // "2025-01-24T05:42:00.000000Z" (6-digit fixed)
234+
std::string extended = dt1.toString(DateTime::Format::Iso8601Extended); // "2025-01-24T05:42:00+00:00"
235+
std::string basic = dt1.toString(DateTime::Format::Iso8601Basic); // "20250124T054200Z"
226236

227237
// Epoch timestamp conversions
228238
std::int64_t epochSeconds = dt1.toEpochSeconds();
@@ -280,8 +290,13 @@ std::int64_t epochMillis = dto1.toEpochMilliseconds();
280290
DateTimeOffset fromEpoch = DateTimeOffset::fromEpochSeconds(epochSeconds);
281291
282292
// Formatting
283-
std::string iso = dto1.toString(); // "2025-01-24T05:42:00+02:00"
284-
std::string precise = dto1.toString(DateTime::Format::Iso8601Precise); // "2025-01-24T05:42:00.0000000+02:00"
293+
std::string iso = dto1.toString(); // "2025-01-24T05:42:00+02:00"
294+
std::string precise = dto1.toString(DateTime::Format::Iso8601Precise); // "2025-01-24T05:42:00.0000000+02:00"
295+
std::string trimmed = dto1.toString(DateTime::Format::Iso8601PreciseTrimmed); // "2025-01-24T05:42:00.0+02:00" (trailing zeros removed)
296+
std::string millis = dto1.toString(DateTime::Format::Iso8601Millis); // "2025-01-24T05:42:00.000+02:00" (3-digit fixed)
297+
std::string micros = dto1.toString(DateTime::Format::Iso8601Micros); // "2025-01-24T05:42:00.000000+02:00" (6-digit fixed)
298+
std::string extended = dto1.toString(DateTime::Format::Iso8601Extended); // "2025-01-24T05:42:00+02:00" (same as default)
299+
std::string basic = dto1.toString(DateTime::Format::Iso8601Basic); // "20250124T054200+0200"
285300
```
286301

287302
### TimeSpan - Duration Calculations
@@ -511,4 +526,4 @@ All dependencies are automatically fetched via CMake FetchContent when building
511526

512527
---
513528

514-
_Updated on January 05, 2026_
529+
_Updated on January 11, 2026_

0 commit comments

Comments
 (0)