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

Weeks is missing on "mini-minute-now" option #40

Closed
kaylalarson1990 opened this issue Nov 23, 2020 · 1 comment
Closed

Weeks is missing on "mini-minute-now" option #40

kaylalarson1990 opened this issue Nov 23, 2020 · 1 comment

Comments

@kaylalarson1990
Copy link

From the documentation, it seems that the mini options should be the same as the round option except shorter (i.e. seconds = s), however it doesn't seem that the days every refactor into weeks for the mini-minute-now option. I tried all of the mini options and I never got it to work (6days to 1week) as I thought it should. Should the mini options have the week options available or am I mistaken?

@kaylalarson1990 kaylalarson1990 changed the title Weeks is missing on mini-minute-now option Weeks is missing on "mini-minute-now" option Nov 23, 2020
@catamphetamine
Copy link
Owner

Oh, actually, you're right: mini style doesn't include weeks.
The rationale is that for me personally, "3wk" looks less "intuitive" than, say, "24d": I did a quick test and found myself wondering "What is 3wk?" and re-calculating it back to days or months "in background".
So, I assume "wk" is a not-so-intuitive time interval measurement unit due to the fact that it's not so common and therefore isn't parsed that quickly by people's brain.
"weeks" looks better: it's "parsed" "instantly", and the brain doesn't seem to recalculate weeks into days in that case.
In any case, a developer may use their own custom style as simple as:

export default {
	steps: [
		{ formatAs: 'second' },
		{ formatAs: 'minute' },
		{ formatAs: 'hour' },
		{ formatAs: 'day' },
		{ formatAs: 'week' },
		{ formatAs: 'month' },
		{ formatAs: 'year' }
	],
	labels: [
		// "mini" labels are only defined for a few languages.
		'mini',
		// "short-time" labels are only defined for a few languages.
		'short-time',
		// "narrow" and "short" labels are defined for all languages.
		// "narrow" labels can sometimes be weird (like "+5d."),
		// but "short" labels have the " ago" part, so "narrow" seem
		// more appropriate.
		// "short" labels would have been more appropriate if they
		// didn't have the " ago" part, hence the "short-time" above.
		'narrow',
		// Since "narrow" labels are always present, "short" element
		// of this array can be removed.
		'short'
	]
}

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

No branches or pull requests

2 participants