Skip to content

Instantly share code, notes, and snippets.

View Patrick-Jabba's full-sized avatar
🤓
Full Stack Developer Next.Js

Patrick Monteiro Fischer Patrick-Jabba

🤓
Full Stack Developer Next.Js
View GitHub Profile
export function getDiffTimeBetweenCurrentDate (dateString = '', now = new Date()) {
const dayInMilliseconds = 86400000
if ([null, undefined, false, true].includes(dateString)) {
return dateString
}
const date = new Date(dateString)
const isInvalidDate = isNaN(date.getTime())
if (isInvalidDate) {
return dateString
@diego3g
diego3g / settings.json
Last active July 12, 2025 02:34
VSCode Settings (Updated)
{
"workbench.startupEditor": "newUntitledFile",
"editor.fontSize": 16,
"editor.lineHeight": 1.8,
"javascript.suggest.autoImports": true,
"javascript.updateImportsOnFileMove.enabled": "always",
"editor.rulers": [
80,
120
],