![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
php date() work-alike for nodejs
var phpdate = require('phpdate-js');
var gmdate = require('phpdate-js').gmdate;
phpdate('Y-m-d H:i:s T');
// => "2014-11-27 13:58:02 EST"
gmdate('Y-m-d H:i:s T', new Date());
// => "2014-11-27 18:58:02 GMT"
phpdate('Y-m-d H:i:s', 1234567890000);
// => "2009-02-13 18:31:30"
See php's date for the supported conversions (as of php 5.5). Of them, W and o are not yet implemented.
The conversion is quick, about half the speed of Date.toISOString().
return a formatted date string like PHP's date() does. Supports all conversions other than the ISO-8601 W and o, though timezone and localization support is rather lacking. North America timezones should work.
Format is the timestamp conversion spec. 'Y-m-d H:i:s' formats an SQL datetime (ISO 9075). The date and time are formatted for the current locale, with timezone and daylight savings adjustments applied.
The timestamp is optional; it can be a Date object or a JavaScript millisecond timestamp (milliseconds since the epoch). If not specified, the current date is used.
var phpdate = require('phpdate-js');
phpdate('Y-m-d H:i:s.u T'); // 2014-10-18 04:56:53.437000 EDT
Identical to phpdate, but the timestamp is formatted as UTC, without timezone or daylight saving adjustments.
var gmdate = require('phpdate-js').gmdate;
var now = gmdate('Y-m-d H:i:s T');
// => "2014-11-27 19:17:50 GMT"
FAQs
fast php date() work-alike for nodejs
We found that phpdate-js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.