Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@kefniark
Copy link
Contributor

@kefniark kefniark commented May 14, 2021

Description

  • Add comment as element
  • Fix issue with bool and expression containing function
  • Add std function related to time
    • Time.now() => number
    • Time.day(date: number) => number
    • Time.weekday(date: number) => number
    • Time.year(date: number) => number
    • Time.hour(date: number) => number
    • Time.minute(date: number) => number
    • Time.second(date: number) => number
    • Time.ms(date: number) => number
    • Time.parse(date: string) => number
    • Time.format(date: number, format: string) => number
    • Time.tz() => number

Example

date = Time.now()

// normal getter
a = Time.day(date) // get day 0-31
b = Time.weekday(date) // get day in the week 0-6
c = Time.year(date) // get year 2014
d = Time.hour(date) // get hour 0-23
e = Time.minute(date) // get minute 0-59
f = Time.second(date) // get second 0-59
g = Time.ms(date) // get second 0-999
h = Time.tz() // get timezone offset in minute
i = Time.format(date, 'yyyy-mm-dd HH:MM:ss')

// parsing and format
b = Time.parse('2014-07-03')
c = Time.parse('2014-07-03') |> $ + HOUR(5) |> Time.format($, 'yyyy-mm-dd')

@sonarqubecloud
Copy link

sonarqubecloud bot commented May 14, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@kefniark kefniark merged commit 2eed1b3 into develop May 14, 2021
@kefniark kefniark deleted the feature/comment branch May 17, 2021 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants