Exemplo n.º 1
0
def filter_by__current_worksheet_month(day, raw_hours):
    workbook = workbooknav.workbooknavigator(day)
    month = max(1, workbook.startofmonthnumber)

    hours = filter_by_month(raw_hours, month)
    hours.extend( filter_by_month(raw_hours, month - 1) )
    return hours
Exemplo n.º 2
0
	def gettimesheetcell(self, day, column):
		rowposition = workbooknav.workbooknavigator(day)
		cell = "%s%s" % (column.upper(), rowposition.row())
		print rowposition.sheetname()
		print cell
		sheet = self.workbook.Sheets(rowposition.sheetname())
		actualCell = sheet.Range(cell)
		return actualCell
Exemplo n.º 3
0
 def gettimesheetcell(self, day, column):
     rowposition = workbooknav.workbooknavigator(day)
     cell = "%s%s" % (column.upper(), rowposition.row())
     print rowposition.sheetname()
     print cell
     sheet = self.workbook.Sheets(rowposition.sheetname())
     actualCell = sheet.Range(cell)
     return actualCell
 def test_will_use_default_date_from_workbooknav(self):
     workbook = workbooknav.workbooknavigator(datetime(3000, 3, 22))
     
     assert workbook.startofmonthnumber == 0
     assert workbook.sheet_name == "January"
     assert workbook.startofmonthdate == datetime(datetime.now().year, 1, 1)
Exemplo n.º 5
0
    def test_will_use_default_date_from_workbooknav(self):
        workbook = workbooknav.workbooknavigator(datetime(3000, 3, 22))

        assert workbook.startofmonthnumber == 0
        assert workbook.sheet_name == "January"
        assert workbook.startofmonthdate == datetime(datetime.now().year, 1, 1)