Entry 3359

return_time

   

Submitted by anonymous on March 12, 2010 at 8:35 p.m.
Language: Python 3. Code size: 332 bytes.

def ampm(mtime):
    mHours=return_hours(mtime)
    mMinutes=return_minutes(mtime)
    hours=0
    if mHours>12:
        regHours=mHours-12
    else:
        regHours=mHours
        
    if (mHours < 12):
        ampm="AM"
    else:
        ampm="PM"
    regTime=str(regHours)+":"+str(mMinutes)+ampm
    return regTime

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).