#coding=utf-8

import datetime
import time

def today():
    return datetime.date.today()

def lastday():
    return today() - datetime.timedelta(1)

def tommorrow():
    return today() + datetime.timedelta(1)

def stamp_to_date_str(stamp):
    return time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(int(stamp)))

def date_str_to_stamp(dateString):
    return int(time.mktime(time.strptime(dateString,'%Y-%m-%d %H:%M:%S')))
	
def current_time():
    return str(time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time())))