dtkago3208 2017-09-04 21:53
浏览 6

PHP jdmonthname()返回错误的月份名称

I am having this problem with jdmonthname() function in php. In my project I have used jdmonthname() in two places. One is working good. But the other one is returning wrong results. I am getting my input from passed into URL(example: http://localhost:8000/doctor_profile/1/2017-03-28).

$schedules['monthName'] = jdmonthname(strtotime($returnCalenderMonth['requestedCalenderMonth']), 1);

where $returnCalenderMonth['requestedCalenderMonth'] has the data '2017-03-28' as string and returns 'January' where it should be March. On input '2017-1-28' it returns 'April' instead of January etc. etc..

I have checked and found that strtotime() function is returning correct value with Unix Timestamp Conversion Tools. I have searched but could not find any reference to this problem. E.g, I am using PHP 5.6, Ubuntu 16.4 x64, Laravel 5.4 for my project.

I will be grateful if somebody can help me. Thanks in advance

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 三因素重复测量数据R语句编写,不存在交互作用
    • ¥15 微信会员卡等级和折扣规则
    • ¥15 微信公众平台自制会员卡可以通过收款码收款码收款进行自动积分吗
    • ¥15 随身WiFi网络灯亮但是没有网络,如何解决?
    • ¥15 gdf格式的脑电数据如何处理matlab
    • ¥20 重新写的代码替换了之后运行hbuliderx就这样了
    • ¥100 监控抖音用户作品更新可以微信公众号提醒
    • ¥15 UE5 如何可以不渲染HDRIBackdrop背景
    • ¥70 2048小游戏毕设项目
    • ¥20 mysql架构,按照姓名分表