mirror of
https://github.com/theoludwig/theoludwig.git
synced 2025-05-29 22:37:44 +02:00
feat: display age nearby the birth date
This commit is contained in:
@ -1,4 +1,9 @@
|
||||
export const DIVLO_BIRTHDAY = new Date('2003-03-31')
|
||||
export const DIVLO_BIRTHDAY_DAY = '31'
|
||||
export const DIVLO_BIRTHDAY_MONTH = '03'
|
||||
export const DIVLO_BIRTHDAY_YEAR = '2003'
|
||||
export const DIVLO_BIRTHDAY = new Date(
|
||||
`${DIVLO_BIRTHDAY_YEAR}-${DIVLO_BIRTHDAY_MONTH}-${DIVLO_BIRTHDAY_DAY}`
|
||||
)
|
||||
|
||||
/**
|
||||
* Calculates the age of a person based on their birth date
|
||||
|
@ -1,6 +1,3 @@
|
||||
import { DIVLO_BIRTHDAY, getAge } from './getAge'
|
||||
|
||||
export const getDefaultDescription = (): string => {
|
||||
const age = getAge(DIVLO_BIRTHDAY)
|
||||
export const getDefaultDescription = (age: number): string => {
|
||||
return `I'm Divlo, I'm ${age} years old, I'm from France - Developer Full Stack Junior • Passionate about High-Tech`
|
||||
}
|
||||
|
Reference in New Issue
Block a user