Skip to content

Folders/Files #2

Description

@kennyctran

module.exports.generateDate = () => {
let dateObj = new Date();
let month = dateObj.getUTCMonth() + 1; //months from 1-12
let day = dateObj.getUTCDate();
let year = dateObj.getUTCFullYear();
if (Number(day) < 10) {
day = '0' + day;
}
if (Number(month) < 10) {
month = '0' + month;
}
newdate = year + "-" + month + "-" + day;
return newdate;
}

helperFunctions is a little too vague of a file name and could mean anything. If this were a folder possibly with files/modules of individual functions then it might be a little more specific.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions