text: /**
   * @author     Deepak Tiwari [ Emp Id: U43779 ]
   * @description
   *
   * DateTime utility class that spits out UTC timestamp strings usually used in a reporting, print-capable process.
   */
  (function ()
  {
      "use strict";
  
      /**
       * Register the class with RequireJS.
       */
      define([], function ()
      {
          /**
           * Creates a date timestamp string.
           */
          var buildTimeString = function (date, format)
          {
              format = format || "%h:%m:%s:%z";
  
              function pad(value, isMilliSeconds)
              {
                  if(typeof (isMilliSeconds) === "undefined")
                  {
                      isMilliSeconds = false;
                  }
                  if(isMilliSeconds)
                  {
                      if(value < 10)
                      {
                          value = "00" + value;
                      }
                      else if(value < 100)
                      {
                          value = "0" + value;
                      }
                  }
                  return(value.toString().length < 2) ? "0" + value : value;
              }
  
              return format.replace(/%([a-zA-Z])/g, function (_, fmtCode)
              {
                  switch(fmtCode)
                  {
                  case "Y":
                      return date.getFullYear();
                  case "M":
                      return pad(date.getMonth() + 1);
                  case "d":
                      return pad(date.getDate());
                  case "h":
                      return pad(date.getHours());
                  case "m":
                      return pad(date.getMinutes());
                  case "s":
                      return pad(date.getSeconds());
                  case "z":
                      return pad(date.getMilliseconds(), true);
                  default:
                      throw new Error("Unsupported format code: " + fmtCode);
                  }
              });
          };
  
          // Publish API for DateTime utils
          return {
              formattedNow: function ()
              {
                  return buildTimeString(new Date());
              }
          };
  
      });
  
  })();
  