Documentation: Additional information on difference-between

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

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
45/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Stale
Domain
documentation

Research direction

Locate the documentation for difference-between and review its existing explanation of DAY and DATE logotimes. Add the specified YEAR error, leap-day behavior, Julian-date calculation, result ranges, and absolute DATE differences, including the provided example; done when all listed cases are documented accurately.

Written by the indexing model from the issue text.

Description

documentation

This stuff needs to be covered in the documentation for difference-between.
When used on logotimes of type "DAY":

  • It is an error to ask for differences in years (time:difference-between logotime1 logotime2 "YEAR")
  • Differences in units of "DAY" are simply the Julian date (day of the year) of logotime2 minus the Julian date of logotime1, using the year 2000. This means that leap day (February 29) is included. Therefore this code:
    time:difference-between (time:create "02-28") (time:create "03-01") "DAY"
    produces a result of 2 days. This method also means that difference-between can produce results between -365 and +365 days.

When used on logotimes of type "DATE", differences in units of "DAY" are the absolute number of days between the two dates, so they can be > 365 or <-365.

Dominant language
Scala
Stars
8
Forks
4
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 NetLogo/Time-Extension

All issues in NetLogo/Time-Extension

Similar issues

More Scala issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.