PHPackages                             webapix/dot-net-json-date-formatter - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. webapix/dot-net-json-date-formatter

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

webapix/dot-net-json-date-formatter
===================================

Convert .net json date format to PHP DateTime object and vica versa

v1.1.0(4y ago)7216.2k—9.9%21MITPHPPHP &gt;=5.6CI failing

Since Jul 7Pushed 11mo ago2 watchersCompare

[ Source](https://github.com/webapix/dot-net-json-date-formatter)[ Packagist](https://packagist.org/packages/webapix/dot-net-json-date-formatter)[ Docs](https://github.com/webapix/dot-net-json-date-formatter)[ Fund](http://patrons.webapix.hu)[ RSS](/packages/webapix-dot-net-json-date-formatter/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (3)Dependencies (1)Versions (4)Used By (1)

Dotnet JSON date
================

[](#dotnet-json-date)

[![Tests](https://github.com/webapix/dot-net-json-date-formatter/workflows/Tests/badge.svg)](https://github.com/webapix/dot-net-json-date-formatter/actions?query=workflow%3ATests+branch%3Amaster)[![MIT Licensed](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)

Parse [.Net JSON dates](https://docs.microsoft.com/en-us/previous-versions/dotnet/articles/bb299886(v=msdn.10)#from-javascript-literals-to-json) to [DateTime](https://www.php.net/manual/en/class.datetime.php) object, and convert [DateTime](https://www.php.net/manual/en/class.datetime.php) object to .Net JSON date format.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require webapix/dot-net-json-date-formatter
```

Usage
-----

[](#usage)

To parse .NET JSON dates:

```
use \Webapix\DotNetJsonDate\Date;

Date::toDateTime('/Date(1593432000000+0200)/'); // return with \DateTime object
```

If the Json string is invalid, it will throw an \\Webapix\\DotNetJsonDate\\InvalidJsonDateString exception.

To convert DateTime to JSON date:

```
use \Webapix\DotNetJsonDate\Date;

$dateTime = DateTime::createFromFormat('Y-m-d H:i:s', '2020-06-29 12:00:00');
Date::toJsonDate($dateTime); // return with: /Date(1593432000000+0000)/
```

Testing
-------

[](#testing)

```
composer test
```

Postcardware
------------

[](#postcardware)

According to the postcardware concept, if you use the software for your project(s) we would appreciate to receive a postcard of your hometown.

Please send it to:

WEBAPIX KFT. Kőris utca 2/E, 2/1
2051 Biatorbágy
Hungary

Support us
----------

[](#support-us)

If you find our packages useful and would like to support our work in maintaining and regularly updating them, consider becoming a patron. Any size of donation is welcome and highly appreciated.

Contributing
------------

[](#contributing)

Contributions are welcome! When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [WEBAPIX Kft.](https://webapix.hu)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance37

Infrequent updates — may be unmaintained

Popularity40

Moderate usage in the ecosystem

Community13

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~272 days

Total

3

Last Release

1688d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/637b3b9ea15b2873d711b6966e49edb88700a50482f017718024968a1fa494ac?d=identicon)[zsocakave](/maintainers/zsocakave)

---

Top Contributors

[![zsocakave](https://avatars.githubusercontent.com/u/17034280?v=4)](https://github.com/zsocakave "zsocakave (6 commits)")

---

Tags

date-formattingdatetimephpwebapix.net json date parser.net json date converter

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/webapix-dot-net-json-date-formatter/health.svg)

```
[![Health](https://phpackages.com/badges/webapix-dot-net-json-date-formatter/health.svg)](https://phpackages.com/packages/webapix-dot-net-json-date-formatter)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
