date 'F' what is it
<?php
// To change the format of an existing date
$old_date_format = "20/03/1999";
$new_data_format = date("Y-m-d H:i:s", strtotime($old_date_format));Things to be aware of when using week numbers with years.
<?php
echo date("YW", strtotime("2011-01-07")); // gives 201101
echo date("YW", strtotime("2011-12-31")); // gives 201152
echo date("YW", strtotime("2011-01-01")); // gives 201152 too
?>
BUT
<?php
echo date("oW", strtotime("2011-01-07")); // gives 201101
echo date("oW", strtotime("2011-12-31")); // gives 201152
echo date("oW", strtotime("2011-01-01")); // gives 201052 (Year is different than previous example)
?>
Reason:
Y is year from the date
o is ISO-8601 year number
W is ISO-8601 week number of year
Conclusion:
if using 'W' for the week number use 'o' for the year.
Also in PHP:
- date functions in php
- ** (process:82385): CRITICAL **: 22:54:20.169: string_replace: assertion 'self != NULL' failed
- Your Composer dependencies require the following PHP extensions to be installed: fileinfo
- add 1 day to date php
- .htacess to remove index.php on codeigniter localhost
- Count length of array string.in php
- composer clear cache laravel
- dsiplay datetime without T php
- check php version linux terminal
- add php var to js console log
- create laravel new project
- check if string contains a word php
- array key exist in phgp
- changing php version in composer in server
- @ watch: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
- check if array has a certain key
- case upper php
- check array key php
- Which are valid PHP error handling keywords? try throw catch finally
- cache DB table laravel
- Str::split laravel
- console.log php page
- .htaccess for codeigniter
- date time php format double digits