Initial scaffadling for app Generate Display
This commit is contained in:
		
							parent
							
								
									158a31d8e0
								
							
						
					
					
						commit
						b0e4dda7b8
					
				
							
								
								
									
										19
									
								
								generatedisplay.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								generatedisplay.py
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,19 @@
 | 
				
			|||||||
 | 
					from workdays import get_date_range
 | 
				
			||||||
 | 
					from finddates import get_birthdays, get_anniversary
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def test_output(items):
 | 
				
			||||||
 | 
					    for item in items:
 | 
				
			||||||
 | 
					        print('{0:5d}  {1:30} {2:%Y-%m-%d}'.
 | 
				
			||||||
 | 
					              format(item[0], item[1]+', '+item[2], item[3]))
 | 
				
			||||||
 | 
					    print('')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if __name__ == "__main__":
 | 
				
			||||||
 | 
					    print('BIRTHDAYS ======================================')
 | 
				
			||||||
 | 
					    start, thru = get_date_range()
 | 
				
			||||||
 | 
					    test_output(get_birthdays(start, thru))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    print('ANNIVERSARIES ==================================')
 | 
				
			||||||
 | 
					    start, thru = get_date_range('2017-04-01')
 | 
				
			||||||
 | 
					    test_output(get_anniversary(start, thru))
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user