Skip to content

Instantly share code, notes, and snippets.

@parzibyte

parzibyte/fin.js Secret

Last active December 3, 2020 18:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/57d70930e760b40aac1b36f9b9bd8e3d to your computer and use it in GitHub Desktop.
Save parzibyte/57d70930e760b40aac1b36f9b9bd8e3d to your computer and use it in GitHub Desktop.
const obtenerFechaFinDeMes = () => {
const fechaFin = new Date();
// Iniciar en este año, el siguiente mes, en el día 0 (así que así nos regresamos un día)
return new Date(fechaFin.getFullYear(), fechaFin.getMonth() + 1, 0);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment