Use ++ instead of concat
Use replicate instead of repeat and take
Extract function
Extract format function
Use constant instead of argument
Extract calendar function