Skip to content

Fix relative time text (e.g "today ago")#53

Open
GLobyNew wants to merge 1 commit into
retlehs:mainfrom
GLobyNew:todayAgo
Open

Fix relative time text (e.g "today ago")#53
GLobyNew wants to merge 1 commit into
retlehs:mainfrom
GLobyNew:todayAgo

Conversation

@GLobyNew

Copy link
Copy Markdown
Contributor

I've encountered just registered domain and it looks like relativeTime doesn't handle today / tomorrow duration properly:

image

"today ago"

I've added two additional check for today and tomorrow and func plural(n int, unit string) string function.

P.S the %ss means literally unit string + 's'. Maybe it's a bit confusing, its not special format specifier :)

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.

1 participant