Skip to content
Snippets Groups Projects
Select Git revision
  • 0140606eb9b29fe4bffe24bb6d8d4768c9cd1e2e
  • dev default protected
  • prod protected
  • 1.0.58
  • 1.0.57
  • 1.0.52
  • 1.0.56
  • 1.0.51
  • 1.0.50
  • 1.0.33
  • 1.0.32
  • 1.0.31
  • 1.0.30
  • 1.0.29
  • 1.0.28
  • 1.0.27
  • 1.0.26
  • 1.0.25
  • 1.0.24
  • 1.0.23
  • 1.0.22
  • 1.0.21
  • 1.0.20
23 results

LayoutProcessorPlugin.php

Blame
  • date_utils.go 11.25 KiB
    package date_utils
    
    import (
    	"fmt"
    	"reflect"
    	"strconv"
    	"strings"
    	"time"
    
    	"github.com/araddon/dateparse"
    	"gitlab.bob.co.za/bob-public-utils/bobgroup-go-utils/errors"
    	"gitlab.bob.co.za/bob-public-utils/bobgroup-go-utils/utils"
    )
    
    const TimeZoneString = "Africa/Johannesburg"
    
    var currentLocation *time.Location
    
    func DateLayoutYearMonthDayTimeT() string {
    	layout := "2006-01-02T15:04:05"
    	return layout
    }
    
    func DateLayoutYearMonthDayTimeTZ() string {
    	layout := "2006-01-02T15:04:05Z"
    	return layout
    }
    
    func DateLayoutYearMonthDayTimeMillisecondTZ() string {
    	layout := "2006-01-02T15:04:05.000Z"
    	return layout
    }
    
    func DateLayoutDB() string {
    	return "2006-01-02 15:04:05.000000-07"
    }
    
    func DateLayoutYearMonthDayTimeTimezone() string {
    	layout := "2006-01-02 15:04:05-07:00"
    	return layout
    }
    
    func DateLayoutForDB() string {
    	layout := "2006-01-02 15:04:05-07"
    	return layout
    }
    
    func DateLayoutYearMonthDayTime() string {
    	layout := "2006-01-02 15:04:05"
    	return layout
    }
    
    func DateLayoutFilenameSafe() string {
    	layout := "02-Jan-2006-15h04"
    	return layout
    }
    
    func DateLayoutYearMonthDay() string {
    	layout := "2006-01-02"
    	return layout
    }
    
    func DateLayoutTime() string {
    	layout := "15:04:05"
    	return layout
    }
    
    func DateLayoutHumanReadable() string {
    	layout := "02 Jan 2006"
    	return layout