tarantool / tarantool/tarantool

datetime: allow to format ISO ordinal, week and quarter dates

Open
#12,483 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

datetime feature
Dominant language
Lua
Stars
3.7k
Forks
419
Avg merge
1d 23h
Merged PRs (30d)
88

Description

We can parse ISO ordinal and week dates and a quarter dates (tarantool extension). But we can't render them with format(). Only calendar dates are rendered.

/src/tarantool -i
Tarantool 3.7.0-entrypoint-149-gd4a28c5a3
type 'help' for interactive help

tarantool> dt = require("datetime")
---
...

tarantool> dt.parse('2012Q230'):format()
---
- 2012-04-30T00:00:00Z
...

tarantool> dt.parse('2012-W10-7'):format()
---
- 2012-03-11T00:00:00Z
...

tarantool> dt.parse('2012-100'):format()
---
- 2012-04-09T00:00:00Z
...

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the datetime module's format() entry point and compare it with the existing parse() handling for ISO ordinal, week, and quarter dates. Extend formatting so the examples in the issue produce the corresponding ISO date representations, then add or run coverage for those three input forms and verify calendar-date formatting remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.