<s> '''<STR_LIT>''' <EOL> import contacts , datetime <EOL> def days_until_next ( date ) : <EOL> now = datetime . datetime . now ( ) <EOL> inc = int ( datetime . datetime ( now . year , date . month , date . day ) < now ) <EOL> return ( datetime . datetime ( now . year + inc , date . month , date . day ) - now ) . days <EOL> text = '<STR_LIT:\n>' . join ( '<STR_LIT>' . format ( ** x ) for x <EOL> in sorted ( ( { '<STR_LIT:p>' : p , '<STR_LIT>' : days_until_next ( p . birthday ) } for p <EOL> in contacts . get_all_people ( ) if p . birthday ) , key = lambda x : x [ '<STR_LIT>' ] ) ) <EOL> print ( '<STR_LIT>' . format ( '<STR_LIT:=>' * <NUM_LIT> , text ) if text else <EOL> "<STR_LIT>" ) </s>
