Return to Snippet

Revision: 12504
at March 17, 2009 15:57 by tamuratetsuya


Initial Code
def sinceParm(d):
    #曜日
    date = decoThree(d.strftime("%A"))
    #日にち
    day = decoDay(d.strftime("%d"))
    #月
    mth = decoThree(d.strftime("%B"))
    #年日時
    ytime = d.strftime("%Y+%H %M %S")
    ytime = ytime.replace(' ','%3A')
    return date + "%2C+"+ day + "+" + mth + "+" + ytime + "+GMT"

def decoDay(day):
    if (day[0] == "0"):return day[1]
    else:return day
def decoThree(string):
    deco = string[0]+string[1]+string[2]
    return deco

Initial URL

                                

Initial Description

                                

Initial Title
twitterのsinceの日時フォーマットの作成

Initial Tags
google, python, django

Initial Language
Python