You can add syntactic sugar by adding a computed var with the same name to working example at the top In this example
var formatter : NSDateFormatter { get { Constants.formatter } set { Constants.formatter = newValue } }
Topic:
Programming Languages
SubTopic:
Swift
Tags: