Giter Site home page Giter Site logo

magic.lambda.dates's Introduction

Magic Lambda Dates

Date manipulation slots for Magic. More specifically, this project contains the following slots.

  • [date.now] - Returns the now date, equivalent of DateTime.Now.
  • [date.min] - Returns the minimum date value, equivalent of DateTime.MinValue.
  • [date.format] - Returns a string representation of some date, formatted according to the specified [format] argument.
  • [time] - Creates a time span, useful for adding and subtracting offsets to date objects. Pass in [days], [hours], [minutes], [seconds] or [milliseconds] to declare how large your offset is. All arguments are optional, but (of course) at least one argument should be passed in.

Notice - Internally in Magic, everything is UTC Universal timezone, implying if you want to render it in user's timezone, you'll have to convert it explicitly in your client/frontend. All dates and times internally in Magic, also those stored into any database, are treated as UTC timezone. All dates transmitted to the backend, is also assumed to be UTC. This is to make things simple in regards to interacting with database systems, that may or may not add support for timezone offsets.

Below is an example of taking the current date and time, and adding two days and one second to it, for then to format the result as a string.

math.add
   date.now
   time
      days:2
      second:1
date.format:x:-
   format:"yyyy-MM-dd HH:mm:ss"

Project website

The source code for this repository can be found at github.com/polterguy/magic.lambda.dates, and you can provide feedback, provide bug reports, etc at the same place.

Quality gates

  • Quality Gate Status
  • Bugs
  • Code Smells
  • Coverage
  • Duplicated Lines (%)
  • Lines of Code
  • Maintainability Rating
  • Reliability Rating
  • Security Rating
  • Technical Debt
  • Vulnerabilities

License

This project is the copyright(c) 2020-2021 of Thomas Hansen [email protected], and is licensed under the terms of the LGPL version 3, as published by the Free Software Foundation. See the enclosed LICENSE file for details.

magic.lambda.dates's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.