Download the PHP package penobit/persiandate without Composer
On this page you can find all versions of the php package penobit/persiandate. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download penobit/persiandate
More information about penobit/persiandate
Files in penobit/persiandate
Download penobit/persiandate
More information about penobit/persiandate
Files in penobit/persiandate
Vendor penobit
Package persiandate
Short Description Persian datetime package to use and manipulate Persian (jalali) datetime.
License MIT
Package persiandate
Short Description Persian datetime package to use and manipulate Persian (jalali) datetime.
License MIT
Please rate this library. Is it a good library?
Informations about the package persiandate
PersianDate
- PersianDate calendar is a solar calendar that was used in Persia, variants of which today are still in use in Iran as well as Afghanistan.
Requirements
php >= 7.0
Run the Composer update command
composer require penobit/persiandate
PersianDate Class and helpers
now([$timestamp = null])
Methods api
CalendarUtils
checkDate($year, $month, $day, [$isPersianDate = true])
toPersianDate($gYear, $gMonth, $gDay)
toGregorian($jYear, $jMonth, $jDay)
strftime($format, [$timestamp = false, $timezone = null])
createDateTimeFromFormat($format, $jalaiTimeString)
createCarbonFromFormat($format, $jalaiTimeString)
convertNumbers($string)
startOfYear()
endOfYear()
startOfWeek()
endOfWeek()
startOfMonth()
endOfMonth()
startOfYear()
endOfYear()
Carbon api-difference
You can convert date/time to briannesbitt/carbon, thus being able to use it's API to work with PHP DateTime class.
Difference in months
Formatting
For help in building your formats, checkout the PHP strftime() docs.
Notes
The class relies on strtotime()
to make sense of your strings, and strftime()
to handle the formatting. Always check the time()
output to see if you get false timestamps, it which case, means the class couldn't understand what you were asking it to do.
All versions of persiandate with dependencies
PHP Build Version
Package Version
Requires
php Version
^7.0 | ^7.1 | ^7.2 | ^8.0 | ^8.1 | ^8.2
nesbot/carbon Version ^1.21 || ^2.0
beberlei/assert Version 3.*
nesbot/carbon Version ^1.21 || ^2.0
beberlei/assert Version 3.*
The package penobit/persiandate contains the following files
Loading the files please wait ....