Improvement request: documentation improvements

Open
#57 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Stale
Tech stack
haskell
Domain
documentation

Research direction

Start in the Data.Thyme.Time.Core module and inventory the undocumented functions, beginning with dayOfYearToMonthAndDay and the addGregorianYearsClip/addGregorianYearsRollover pair. Read their implementations to determine the meaning of each parameter and the behavioral distinction, then document those contracts and verify the project still builds.

Written by the indexing model from the issue text.

Description

Many of the functions in at least Data.Thyme.Time.Core lack any documentation, for example

dayOfYearToMonthAndDay :: Bool -> DayOfYear -> (Month, DayOfMonth)

gives no guidance to what the Bool represents (it's only when looking at the code that you find it specified if the DayOfYear is part of a leap year). In many cases it's pretty clear what the meaning is, but when both

addGregorianYearsClip :: Years -> Day -> Day

and

addGregorianYearsRollover :: Years -> Day -> Day

exist, some documentation is needed to explain exactly what the difference is (what is being clipped or rolled over? Is this also for the case where you're adding years spanning a leap year?)

Dominant language
Haskell
Stars
47
Forks
35
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

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.

More from haskell-github-trust/thyme

All issues in haskell-github-trust/thyme

Similar issues

More Haskell issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.