• Some clocks do it like that

    var _12hour = (require("Storage").readJSON("setting.json",1)||{})["12hour"]||false;
    

    It reads the 12hour value from the main settings file. If the settings file can not be read it initalizes the value with false.

    You can then test in your code if you need to draw a 12 hour or 24 hour value:

    if (_12hour){
    //do 12 hour stuff
    } else {
    //do 24 hour stuff
    }
    
About

Avatar for Raik @Raik started