summaryrefslogtreecommitdiffstats
path: root/ui/src/utils.ts
diff options
context:
space:
mode:
authorFilip Duricic <fdjuricic98@gmail.com>2020-07-11 03:38:01 +0200
committerGitHub <noreply@github.com>2020-07-10 21:38:01 -0400
commit9c7c7b06df0b513aaa36711539fa73d50ec0d09d (patch)
treeb15956168321e3505f2b75e882b02f17ca1c4329 /ui/src/utils.ts
parent8d2465989230fae7d9aae334a67a726fd6ced912 (diff)
Don't show cake day indicator on the same year / day of user registration, instead show it the following years (#936)
Diffstat (limited to 'ui/src/utils.ts')
-rw-r--r--ui/src/utils.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/ui/src/utils.ts b/ui/src/utils.ts
index 6276519b..2bede777 100644
--- a/ui/src/utils.ts
+++ b/ui/src/utils.ts
@@ -496,7 +496,8 @@ export function isCakeDay(published: string): boolean {
return (
userCreationDate.date() === currentDate.date() &&
- userCreationDate.month() === currentDate.month()
+ userCreationDate.month() === currentDate.month() &&
+ userCreationDate.year() !== currentDate.year()
);
}