Adicionar biblioteca tempo na documentação
lucaspompeun opened this issue · comments
Lucas Pompeu Neves commented
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;
};
Leonel Sanches da Silva commented
@lucaspompeun Posso fazer, depois da aprovação da PR em aberto. #27
Lucas Pompeu Neves commented
@leonelsanchesdasilva a PR #27 aceita e já está na documentação em produção
Leonel Sanches da Silva commented
@lucaspompeun Perfeito, obrigado! Deve ser minha próxima contribuição.