V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
mechille
V2EX  ›  问与答

诸如这样的格式:「六月, 25th 2014」怎么转成时间戳?

  •  
  •   mechille · Jun 25, 2014 · 2545 views
    This topic created in 4323 days ago, the information mentioned may be changed or developed.
    php下。

    strtotime 不起作用
    6 replies    2014-06-26 11:48:29 +08:00
    qiayue
        1
    qiayue  
    PRO
       Jun 25, 2014
    也许要先把“六月”转成“6”或者“june”
    zencoding
        2
    zencoding  
       Jun 25, 2014
    这货还没智能到识别“六月”
    subpo
        3
    subpo  
       Jun 25, 2014
    只能自己写个mapping表了,node下倒是可以用momentjs
    rrfeng
        4
    rrfeng  
       Jun 25, 2014
    $ date -d '六月, 25th 2014' +%s
    1403625600


    bash 毫无压力 XD
    yangg
        5
    yangg  
       Jun 26, 2014
    @rrfeng locale的问题吧,我的就识别了不了,
    rrfeng
        6
    rrfeng  
       Jun 26, 2014
    @yangg 跟 locale 没关系吧
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   919 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 22:33 · PVG 06:33 · LAX 15:33 · JFK 18:33
    ♥ Do have faith in what you're doing.