Skip to contents

Create dates and times

Usage

ch_timezone(n = 1)

ch_unix_time(n = 1)

ch_date_time(n = 1)

Arguments

n

(integer) number of things to get, any non-negative integer

See also

Examples

ch_timezone()
#> [[1]]
#> [[1]][[1]]
#> [1] "Africa/Abidjan"
#> 
#> [[1]]$code
#> [1] "CI"
#> 
#> [[1]]$continent
#> [1] "Africa"
#> 
#> [[1]]$name
#> [1] "Côte d'Ivoire"
#> 
#> [[1]]$capital
#> [1] "Yamoussoukro"
#> 
#> 
ch_timezone(10)
#> [[1]]
#> [[1]][[1]]
#> [1] "Asia/Karachi"
#> 
#> [[1]]$code
#> [1] "PK"
#> 
#> [[1]]$continent
#> [1] "Asia"
#> 
#> [[1]]$name
#> [1] "Pakistan"
#> 
#> [[1]]$capital
#> [1] "Islamabad"
#> 
#> 
#> [[2]]
#> [[2]][[1]]
#> [1] "Asia/Kabul"
#> 
#> [[2]]$code
#> [1] "AF"
#> 
#> [[2]]$continent
#> [1] "Asia"
#> 
#> [[2]]$name
#> [1] "Afghanistan"
#> 
#> [[2]]$capital
#> [1] "Kabul"
#> 
#> 
#> [[3]]
#> [[3]][[1]]
#> [1] "Europe/Helsinki"
#> 
#> [[3]]$code
#> [1] "FI"
#> 
#> [[3]]$continent
#> [1] "Europe"
#> 
#> [[3]]$name
#> [1] "Finland"
#> 
#> [[3]]$capital
#> [1] "Helsinki"
#> 
#> 
#> [[4]]
#> [[4]][[1]]
#> [1] "Africa/Maseru"
#> 
#> [[4]]$code
#> [1] "LS"
#> 
#> [[4]]$continent
#> [1] "Africa"
#> 
#> [[4]]$name
#> [1] "Lesotho"
#> 
#> [[4]]$capital
#> [1] "Maseru"
#> 
#> 
#> [[5]]
#> [[5]][[1]]
#> [1] "Indian/Mahe"
#> 
#> [[5]]$code
#> [1] "SC"
#> 
#> [[5]]$continent
#> [1] "Africa"
#> 
#> [[5]]$name
#> [1] "Seychelles"
#> 
#> [[5]]$capital
#> [1] "Victoria"
#> 
#> 
#> [[6]]
#> [[6]][[1]]
#> [1] "Africa/Accra"
#> 
#> [[6]]$code
#> [1] "GH"
#> 
#> [[6]]$continent
#> [1] "Africa"
#> 
#> [[6]]$name
#> [1] "Ghana"
#> 
#> [[6]]$capital
#> [1] "Accra"
#> 
#> 
#> [[7]]
#> [[7]][[1]]
#> [1] "Asia/Kuala_Lumpur" "Asia/Kuching"     
#> 
#> [[7]]$code
#> [1] "MY"
#> 
#> [[7]]$continent
#> [1] "Asia"
#> 
#> [[7]]$name
#> [1] "Malaysia"
#> 
#> [[7]]$capital
#> [1] "Kuala Lumpur"
#> 
#> 
#> [[8]]
#> [[8]][[1]]
#> [1] "Europe/Vatican"
#> 
#> [[8]]$code
#> [1] "VA"
#> 
#> [[8]]$continent
#> [1] "Europe"
#> 
#> [[8]]$name
#> [1] "Vatican City"
#> 
#> [[8]]$capital
#> [1] "Vatican City"
#> 
#> 
#> [[9]]
#> [[9]][[1]]
#> [1] "Asia/Pyongyang"
#> 
#> [[9]]$code
#> [1] "KP"
#> 
#> [[9]]$continent
#> [1] "Asia"
#> 
#> [[9]]$name
#> [1] "North Korea"
#> 
#> [[9]]$capital
#> [1] "Pyongyang"
#> 
#> 
#> [[10]]
#> [[10]][[1]]
#> [1] "Asia/Samarkand" "Asia/Tashkent" 
#> 
#> [[10]]$code
#> [1] "UZ"
#> 
#> [[10]]$continent
#> [1] "Asia"
#> 
#> [[10]]$name
#> [1] "Uzbekistan"
#> 
#> [[10]]$capital
#> [1] "Tashkent"
#> 
#> 

ch_unix_time()
#> [1] 785568307
ch_unix_time(20)
#>  [1] 1088618172 1657635155  942838738 1646397925  789882279  353447365
#>  [7] 1200595664  449916210  157920776  380382083  338841327   99512802
#> [13]  999815142  108832121  593453750 1264521546 1012850367  342996743
#> [19]  491396306  686400002

ch_date_time()
#> [1] "1974-03-05 03:19:31 UTC"
ch_date_time(20)
#> [[1]]
#> [1] "2002-06-10 19:17:54 UTC"
#> 
#> [[2]]
#> [1] "1987-04-09 22:32:40 UTC"
#> 
#> [[3]]
#> [1] "2022-06-29 12:45:46 UTC"
#> 
#> [[4]]
#> [1] "1998-05-24 10:41:23 UTC"
#> 
#> [[5]]
#> [1] "2012-01-10 01:07:38 UTC"
#> 
#> [[6]]
#> [1] "1978-11-18 11:36:09 UTC"
#> 
#> [[7]]
#> [1] "1983-05-01 23:20:26 UTC"
#> 
#> [[8]]
#> [1] "1970-09-15 09:08:44 UTC"
#> 
#> [[9]]
#> [1] "2018-04-27 19:45:43 UTC"
#> 
#> [[10]]
#> [1] "2012-04-18 08:20:00 UTC"
#> 
#> [[11]]
#> [1] "1984-11-11 16:44:06 UTC"
#> 
#> [[12]]
#> [1] "1988-03-06 17:17:06 UTC"
#> 
#> [[13]]
#> [1] "1979-11-02 16:21:39 UTC"
#> 
#> [[14]]
#> [1] "1992-07-09 17:07:11 UTC"
#> 
#> [[15]]
#> [1] "1988-01-09 14:25:47 UTC"
#> 
#> [[16]]
#> [1] "2003-08-17 03:31:02 UTC"
#> 
#> [[17]]
#> [1] "2019-06-11 02:01:00 UTC"
#> 
#> [[18]]
#> [1] "1984-08-29 09:38:13 UTC"
#> 
#> [[19]]
#> [1] "1978-03-17 04:40:13 UTC"
#> 
#> [[20]]
#> [1] "1976-11-17 20:46:57 UTC"
#>