Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ linters:
- exptostd
- fatcontext
- funlen
- goconst
- gocritic
- gocyclo
- goprintffuncname
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,7 @@ gnata targets exact parity with the JSONata reference implementation ([jsonata-j
|---|------|-------|------------|-------|
| 1 | **Large integer precision** | `"123456789012345678"` (exact) | `"123456789012345680"` (float64 rounding) | Go's `json.Number` preserves full precision; JS loses it beyond 2^53. Compare with relative tolerance ~1e-12. |
| 2 | **Null placeholders in auto-mapping** | `["ext1", "ext2"]` | `[null, "ext1", "ext2"]` | jsonata-js inserts `null` for groups with no predicate match. gnata omits them per spec. Strip `null` entries when comparing. |
| 3 | **Datetime formatting in picture strings** | `"October 15, 2025"` | `"Oct 15, 2025"` | picture string modifiers like `[MNn,*-3]` (abbreviated month) are partially supported. gnata may default to the full name for complex modifiers. |

## Regex Engine: RE2 vs JavaScript RegExp

Expand Down
2 changes: 2 additions & 0 deletions functions/datetime_format.go
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,8 @@ func formatIntegerWithGrouping(v int) string {
}

func formatMonthToken(m time.Month, modifier string) string {
// TODO: Support complex width modifiers like [MNn,*-3].
// Currently defaults to full name for range or wildcard modifiers.
switch {
case strings.HasPrefix(modifier, "Nn"):
name := monthNames[m-1]
Expand Down