コード例 #1
0
def get_month():
    year,month,day = configure.get_date()
    if month == 1:
        month = months[month-1]
    elif month == 2:
        month = months[month-1]
    elif month == 3:
        month = months[month-1]
    elif month == 4:
        month = months[month-1]
    elif month == 5:
        month = months[month-1]
    elif month == 6:
        month = months[month-1]
    elif month == 7:
        month = months[month-1]
    elif month == 8:
        month = months[month-1]
    elif month == 9:
        month = months[month-1]
    elif month == 10:
        month = months[month-1]
    elif month == 11:
        month = months[month-1]
    elif month == 12:
        month = months[month-1]
    return month
コード例 #2
0
def get_month():
    """
    Function gets the month.
    """
    year,month,day = configure.get_date(args)

    months = ''
    
    if int(month) == 1:
        months = monthss[int(month)-1]
    elif int(month) == 2:
        months = monthss[int(month)-1]
    elif int(month) == 3:
        months = monthss[int(month)-1]
    elif int(month) == 4:
        months = monthss[int(month)-1]
    elif int(month) == 5:
        months = monthss[int(month)-1]
    elif int(month) == 6:
        months = monthss[int(month)-1]
    elif int(month) == 7:
        months = monthss[int(month)-1]
    elif int(month) == 8:
        months = monthss[int(month)-1]
    elif int(month) == 9:
        months = monthss[int(month)-1]
    elif int(month) == 10:
        months = monthss[int(month)-1]
    elif int(month) == 11:
        months = monthss[int(month)-1]
    elif int(month) == 12:
        # print('in Here')
        months = monthss[int(month)-1]
    # print(int(month))
    return months
コード例 #3
0
from __future__ import print_function
import datetime
from datetime import timedelta
import pickle
import os.path
from googleapiclient.discovery import build
from google_auth_oauthlib.flow import InstalledAppFlow
from google.auth.transport.requests import Request
import start as start_clinic
from pprint import pprint 
import configure

months = ['Jan','Feb','Mar','Apr','Mar','Jun','Jul','Aug','Sep','Oct','Nov','Dec']

year,month,day = configure.get_date()
hour,minutes = configure.get_time()

# If modifying these scopes, delete the file token.pickle.
SCOPES = ['https://www.googleapis.com/auth/calendar.readonly']
"""extract month"""
def get_month():
    year,month,day = configure.get_date()
    if month == 1:
        month = months[month-1]
    elif month == 2:
        month = months[month-1]
    elif month == 3:
        month = months[month-1]
    elif month == 4:
        month = months[month-1]
    elif month == 5: