Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configurable date format #3

Merged
merged 3 commits into from
Jul 24, 2017
Merged

Conversation

eggrobin
Copy link
Contributor

Fix #2, and make the epoch configurable too.
The date format config is of the following form:

RSSTimeFormatter {
  dateFormat = <insert format string here>
}

Example format strings: dd.MM.yyyy, M/d/yyyy, dd/MM/yyyy, yyyy/MM/dd, yyyy. M. d..

@jwvanderbeck
Copy link
Contributor

Has this been tested locally?

@eggrobin
Copy link
Contributor Author

eggrobin commented Jul 24, 2017

For dateFormat:

  • I have checked that absent a config the default is used and works;
  • I have checked that a config with dateFormat = dd.MM.yyyy (frequent in central and eastern Europe) has the intended effect.

For epoch:

  • I have checked that absent a config the default is used;
  • I have checked that with epoch = 1993-01-01T00:00:00 dates are suitably offset.

Note that in practice epoch should be combined with something to offset the initial positions of the celestials in-game, e.g., Principia's game_epoch setting. Principia parses dates that are either Julian dates or a fairly strict subset of ISO 8601, which is why I specifically checked the 1993-01-01T00:00:00 format for the epoch of RSSTimeFormatter, since Principia will accept that format.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants