Closed TNagaraja closed 7 years ago
Here are a few higher-level thoughts I thought of that you might want to consider as you re-read through your code:
moment
objects, and the native Date
format. Consistency is important here, especially given that date parsing is a pillar of this feature. If I were to make a recommendation, I would never even touch the native Date
object, as the moment
library is a battle-tested wrapper, which shields the developer from common Date
pitfalls.true
or false
, ask yourself can I simply return the expression which produces that boolean
result? Developing this sense is a lifetime skill and you won't always please everyone, but we do our best to use tools (like ESLint) to keep the look & feel consistent.
Added functionality so users can optionally choose to specify wfh date and/or time interval. '/wfh MM-DD-YYYY time1 to time2'. Also accepts 'tomorrow' to specify tomorrow's date.