I'm passionate about web development and design. A team player who treasures effective communication. Eager to learn as much as is humanly possible on my road to web-development knighthood(haha).
Location
Nigeria
Education
Bachelor of Engineering, specializing in Electrical and Electronics discipline
Hi Adam, so I guess the point for me was applying something that I understood. My knowledge of RegEx isn't the best, and I wanted to apply something in the code base I could explain if asked. Thanks for sharing!
That's fair, though I would argue the level of RegExiness involved here is something everyone should make a point of learning because it solves so many problems.
An even shorter alternative, since you know the input format won't change: const justDate = date.slice(1, 11).
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi Adam, so I guess the point for me was applying something that I understood. My knowledge of RegEx isn't the best, and I wanted to apply something in the code base I could explain if asked. Thanks for sharing!
That's fair, though I would argue the level of RegExiness involved here is something everyone should make a point of learning because it solves so many problems.
An even shorter alternative, since you know the input format won't change:
const justDate = date.slice(1, 11)
.