func CParseInStringLocation(layout, value, timezone string) (Arrow, error) {
	if location, err := time.LoadLocation(timezone); err == nil {
		return CParseInLocation(layout, value, location)
	} else {
		return New(time.Time{}), err
	}
}
Parse the time using the same format string types as strftime,
within the given location (string value for timezone).
See http://man7.org/linux/man-pages/man3/strftime.3.html for more info.
package arrow
import (
	"strconv"
	"strings"
	"time"
)
type Arrow struct {
	time.Time
}
const (
	Nanosecond  time.Duration = 1
	Microsecond               = 1000 * Nanosecond
	Millisecond               = 1000 * Microsecond
	Second                    = 1000 * Millisecond
	Minute                    = 60 * Second
	Hour                      = 60 * Minute
	Day                       = 24 * Hour
	Week                      = 7 * Day
)
func New(t time.Time) Arrow {
	return Arrow{t}
}
func UTC() Arrow {
	return New(time.Now().UTC())
}
func Unix(sec int64, nsec int64) Arrow {
	return New(time.Unix(sec, nsec))
}
func Epoch() Arrow {
	return Unix(0, 0)
}
func Now() Arrow {
	return New(time.Now())
}
func Yesterday() Arrow {
	return Now().Yesterday()
}
func Tomorrow() Arrow {
	return Now().Tomorrow()
}
func NextSecond() Arrow {
	return Now().AddSeconds(1).AtBeginningOfSecond()
}
func NextMinute() Arrow {
	return Now().AddMinutes(1).AtBeginningOfMinute()
}
func NextHour() Arrow {
	return Now().AddHours(1).AtBeginningOfHour()
}
func NextDay() Arrow {
	return Now().AddDays(1).AtBeginningOfDay()
}
func SleepUntil(t Arrow) {
	time.Sleep(t.Sub(Now()))
}
func InTimezone(timezone string) Arrow {
	return Now().InTimezone(timezone)
}
func (a Arrow) Before(b Arrow) bool {
	return a.Time.Before(b.Time)
}
func (a Arrow) After(b Arrow) bool {
	return a.Time.After(b.Time)
}
func (a Arrow) Equal(b Arrow) bool {
	return a.Time.Equal(b.Time)
}
func (a Arrow) UpTo(b Arrow, by time.Duration) []Arrow {
	var result []Arrow
	if a.After(b) {
		a, b = b, a
	}
	for a.Before(b) || a.Equal(b) {
		result = append(result, a)
		a = a.Add(by)
	}
	return result
}
func (a Arrow) Yesterday() Arrow {
	return a.AddDays(-1)
}
func (a Arrow) Tomorrow() Arrow {
	return a.AddDays(1)
}
func (a Arrow) UTC() Arrow {
	return New(a.Time.UTC())
}
func (a Arrow) Sub(b Arrow) time.Duration {
	return a.Time.Sub(b.Time)
}
func (a Arrow) AddDuration(duration string) Arrow {
	if pduration, err := time.ParseDuration(duration); err == nil {
		return a.Add(pduration)
	}
	return a
}
func (a Arrow) Add(d time.Duration) Arrow {
	return New(a.Time.Add(d))
}
func (a Arrow) InTimezone(timezone string) Arrow {
	if location, err := time.LoadLocation(timezone); err == nil {
		return New(a.In(location))
	}
	return a
}
func (a Arrow) AddDays(days int) Arrow {
	return New(a.AddDate(0, 0, days))
}
func (a Arrow) AddMonths(months int) Arrow {
	return New(a.AddDate(0, months, 0))
}
func (a Arrow) AddYears(years int) Arrow {
	return New(a.AddDate(years, 0, 0))
}
func (a Arrow) AddHours(hours int) Arrow {
	year, month, day := a.Time.Date()
	hour, min, sec := a.Time.Clock()
	d := time.Date(year, month, day, hour+hours, min, sec, a.Nanosecond(), a.Location())
	return New(d)
}
func (a Arrow) AddMinutes(minutes int) Arrow {
	year, month, day := a.Time.Date()
	hour, min, sec := a.Time.Clock()
	d := time.Date(year, month, day, hour, min+minutes, sec, a.Nanosecond(), a.Location())
	return New(d)
}
func (a Arrow) AddSeconds(seconds int) Arrow {
	year, month, day := a.Time.Date()
	hour, min, sec := a.Time.Clock()
	d := time.Date(year, month, day, hour, min, sec+seconds, a.Nanosecond(), a.Location())
	return New(d)
}
func (a Arrow) AtBeginningOfSecond() Arrow {
	return New(a.Truncate(Second))
}
func (a Arrow) AtBeginningOfMinute() Arrow {
	return New(a.Truncate(Minute))
}
func (a Arrow) AtBeginningOfHour() Arrow {
	return New(a.Truncate(Hour))
}
func (a Arrow) AtBeginningOfDay() Arrow {
	d := time.Duration(-a.Hour()) * Hour
	return a.AtBeginningOfHour().Add(d)
}
func (a Arrow) AtBeginningOfWeek() Arrow {
	days := time.Duration(-1*int(a.Weekday())) * Day
	return a.AtBeginningOfDay().Add(days)
}
func (a Arrow) AtBeginningOfMonth() Arrow {
	days := time.Duration(-1*int(a.Day())+1) * Day
	return a.AtBeginningOfDay().Add(days)
}
func (a Arrow) AtBeginningOfYear() Arrow {
	days := time.Duration(-1*int(a.YearDay())+1) * Day
	return a.AtBeginningOfDay().Add(days)
}
func (a Arrow) AddDurations(durations ...string) Arrow {
	for _, duration := range durations {
		a = a.AddDuration(duration)
	}
	return a
}
func formatConvert(format string) string {
	strftimeMapping := map[string]string{
		"%a": "Mon",
		"%A": "Monday",
		"%b": "Jan",
		"%B": "January",
		"%c": "",  
		"%C": "06",
		"%d": "02",
		"%D": "01/02/06",
		"%e": "_2",
		"%E": "",  
		"%F": "2006-01-02",
		"%G": "%G",  
		"%g": "%g",  
		"%h": "Jan",
		"%H": "15",
		"%I": "03",
		"%j": "%j",  
		"%k": "%k",  
		"%l": "_3",
		"%m": "01",
		"%M": "04",
		"%n": "\n",
		"%O": "",  
		"%p": "PM",
		"%P": "pm",
		"%r": "03:04:05 PM",
		"%R": "15:04",
		"%s": "%s",  
		"%S": "05",
		"%t": "\t",
		"%T": "15:04:05",
		"%u": "%u",  
		"%U": "%U",  
		"%V": "%V",  
		"%w": "%w",  
		"%W": "%W",  
		"%x": "%x",  
		"%X": "%X",  
		"%y": "06",
		"%Y": "2006",
		"%z": "-0700",
		"%Z": "MST",
		"%+": "Mon Jan _2 15:04:05 MST 2006",
		"%%": "%%",  
	}
	for fmt, conv := range strftimeMapping {
		format = strings.Replace(format, fmt, conv, -1)
	}
	return format
}
func CParse(layout, value string) (Arrow, error) {
	t, e := time.Parse(formatConvert(layout), value)
	return New(t), e
}
func CParseInLocation(layout, value string, loc *time.Location) (Arrow, error) {
	t, e := time.ParseInLocation(formatConvert(layout), value, loc)
	return New(t), e
}