Resource subscription{Start,End}Date -> current{Start,End}Date in PHP and JavaScript code