Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adicionar biblioteca tempo na documentação #19

Open
lucaspompeun opened this issue Oct 29, 2020 · 3 comments
Open

Adicionar biblioteca tempo na documentação #19

lucaspompeun opened this issue Oct 29, 2020 · 3 comments
Labels
documentation Improvements or additions to documentation

Comments

@lucaspompeun
Copy link
Member

As funcionalidades da biblioteca são desacritas abaixo

module.exports.time = function () {
    return +new Date();
};

module.exports.segundos = function () {
    return new Date().getSeconds();
};

module.exports.minutos = function () {
    return new Date().getMinutes();
};

module.exports.horas = function () {
    return new Date().getHours();
};

module.exports.horario = function (timestamp) {
    let timeFormatted = timestamp !== null ? new Date(timestamp) : new Date();
    return timeFormatted;
};

module.exports.dormir = function (ms) {
    let now = new Date().getTime();
    while (new Date().getTime() < now + ms) { }
    return null;
};
@lucaspompeun lucaspompeun added the documentation Improvements or additions to documentation label Oct 29, 2020
@leonelsanchesdasilva
Copy link
Contributor

@lucaspompeun Posso fazer, depois da aprovação da PR em aberto. #27

@lucaspompeun
Copy link
Member Author

@leonelsanchesdasilva a PR #27 aceita e já está na documentação em produção

@leonelsanchesdasilva
Copy link
Contributor

@lucaspompeun Perfeito, obrigado! Deve ser minha próxima contribuição.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants