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

Date format preference dialog for general usage #7

Closed
yvolk opened this issue Feb 8, 2020 · 2 comments
Closed

Date format preference dialog for general usage #7

yvolk opened this issue Feb 8, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@yvolk
Copy link
Member

yvolk commented Feb 8, 2020

Current implementation

The "Date format preference dialog" allows to select date format from several options (including hiding date completely) or to define your own custom date format for use in a Widget header, Day header or an Event entry.
Three separate settings cover many user requests that we received during several years. Enjoy!

Custom format allows any date patterns, described in the Android documentation. In addition, "b" letter(s) can be used to have in the formatted text "Number of days to event" also.

# Letter(s) Date component Presentation Examples
1. b Number of days to event Number -3, -2, -1, 0, 1, 2, 3
2. BBB Number of days to event Text Yesterday, Today, Tomorrow (only 3 days shown, empty for all other days)
3. bbbb Number of days to event Text + Number -3, -2, Yesterday, Today, Tomorrow, 2, 3
4. BBBB Number of days to event Text 3 day ago, 2 days ago, Yesterday, Today, Tomorrow, in 2 days, in 3 days

The Date format preference dialog:
Screenshot_1581777185

And this is a widget with all three settings customized:
Screenshot_1581782597

Initial thoughts

We have date shown in different places of a widget. And in each place we would like to change the date format. This means that we need to create some universal settings dialog, which could be reused to set date formats separately:

  • in a Widget header (as of ToDo Agenda v.3 we can set single setting to choose between default format or "abbreviated dates")
  • in a Day header (the same)
  • in an Entry (currently we have it in the "Number of days to event" format only)

Corresponding setting should allow to extend existing options so that we can have these options:

  • Hidden (meaning empty space instead of a date or hidden column...)
  • Default system format
  • Default short system format (as we have "Abbreviated dates" now)
  • Number of days to event
  • Custom format, based on existing Android/Java library, allowing to combine existing options and include in the formatted date string also:
    • Yesterday, Today, Tomorrow and numbers for farther days...
    • Day of week
    • Week number
@yvolk yvolk added the enhancement New feature or request label Feb 8, 2020
yvolk added a commit that referenced this issue Feb 9, 2020
yvolk added a commit that referenced this issue Feb 13, 2020
… number of letters is 5 (e.g. bbbbb ) then Yesterday, Today and Tomorrow are used for these close days.
yvolk added a commit that referenced this issue Feb 13, 2020
…e. Date may be shown before time in the "Time below title" layout
yvolk added a commit that referenced this issue Feb 14, 2020
yvolk added a commit that referenced this issue Feb 15, 2020
@yvolk
Copy link
Member Author

yvolk commented Feb 28, 2020

Released in v.4.0.6

@yvolk yvolk closed this as completed Feb 28, 2020
yvolk added a commit that referenced this issue Mar 13, 2020
… and Tomorrow". No additional numbers for farther days are being added in this format.

Add "BBB" and "BBBB" custom patterns.
"BBB" stands for adding "Yesterday, Today and Tomorrow" only. "BBBB", in addition to it, adds "N days ago" and "in N days" for farther days.
yvolk added a commit that referenced this issue Mar 14, 2020
…e first non empty is shown. Add another Pattern example.
yvolk added a commit that referenced this issue Mar 14, 2020
…s to event" substitution into the pattern. Now comma disappears with disappearing "Number of days to event" string
yvolk added a commit that referenced this issue Mar 14, 2020
… days" and "N days ago" instead of (confusing) numbers without any words
@yvolk
Copy link
Member Author

yvolk commented Mar 14, 2020

Improved format released in v.4.0.10

Tomorrow:
Screenshot_1584178746
in 2 days:
Screenshot_1584178790

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

No branches or pull requests

1 participant