Download the PHP package dorian-dates/aritmetic without Composer
On this page you can find all versions of the php package dorian-dates/aritmetic. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dorian-dates/aritmetic
More information about dorian-dates/aritmetic
Files in dorian-dates/aritmetic
Package aritmetic
Short Description Es un modulo que permite manejar las fechas
License MIT
Informations about the package aritmetic
Aritmetica con Fechas
Es un una libreria pequeña que permite el manejo de fechas de forma facil
Instalación
Introducción
La libreria basica de ArithmeticDates usa como base la clase DateTime de php el primer argumnero es la fecha que se desea representar debe ser un string y el segundo parametro es la zona horaria sin embargo las dos opciones son opcionales si no ingresa ninguna de las opciones la clase genera un objeto con la fecha actual y la zona horaria por defecto del servidor
Uso simple
Uso en php veriones 7.4
-
En esta version si se desea implementar una zona horaria en especifico tiene que enviar el primer parametro obligatoriamente como now si se desea la fecha actual y el segundo parametro la zona horaria
Uso en php ^8.0
- A partir de php 8.0 puede informar metodos de una clases que parametros va a enviar y por lo tanto no es nesesario ingresar el primer parametro para generar una un objeto de con la fecha actual
Metodos de la clase ArithmeticDates
-
Tener en cuenta que los segundos afectan en el resultado de la respuesta que regresa hasInterval
-
Retorna false ya que los segundos son mayores que el arithmeticDatesB
- El orden en que se aplique los metodos pueden variar no va resultar en errores ya que se la clase tiene esta diseñada para manejar los desbordes ademas de los años bisiestos