Last active
March 15, 2023 13:51
-
-
Save umutyerebakmaz/559560cc5a85fca9387176a968a59a6e to your computer and use it in GitHub Desktop.
datetime-difference-detector.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const now = new Date(); | |
const scheduledDate = new Date(this.element.scheduledDate); | |
const diff = scheduledDate.getTime() - now.getTime(); | |
diff < 0 ? (this.showWarningColor = true) : (this.showWarningColor = false); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment