Giter VIP home page Giter VIP logo

siddhi-execution-time's Introduction

siddhi-execution-time

The siddhi-execution-time extension is an extension to Siddhi that provides time related functionality to Siddhi such as getting current time, current date, manipulating/formatting dates and etc.

Find some useful links below:

Latest API Docs

Latest API Docs is 4.0.7.

How to use

Using the extension in WSO2 Stream Processor

  • You can use this extension in the latest WSO2 Stream Processor that is a part of WSO2 Analytics offering, with editor, debugger and simulation support.

  • This extension is shipped by default with WSO2 Stream Processor, if you wish to use an alternative version of this extension you can replace the component jar that can be found in the <STREAM_PROCESSOR_HOME>/lib directory.

Using the extension as a java library

  • This extension can be added as a maven dependency along with other Siddhi dependencies to your project.
     <dependency>
        <groupId>org.wso2.extension.siddhi.execution.time</groupId>
        <artifactId>siddhi-execution-time</artifactId>
        <version>x.x.x</version>
     </dependency>

Jenkins Build Status


Branch Build Status
master Build Status

Features

  • currentDate ((Function))

    This function returns system time in yyyy-MM-dd format.

  • currentTime ((Function))

    This function returns system time in in HH:mm:ss format.

  • currentTimestamp ((Function))

    This function returns system time in yyyy-MM-dd HH:mm:ss format.

  • date ((Function))

    This function returns date part from a date or date/time expression.

  • dateAdd ((Function))

    This function returns added specified time interval to a date.If a STRING parameter passed as the first argument then function accepts four parameters with last as optional which is the date.format. If a LONG parameter passed as the first argument, then function accepts three parameters which are timestamp.in.milliseconds,expr,unit in order.

  • dateDiff ((Function))

    This function returns time(days) between two dates. If two STRING arguments are sent as first two parameters then function should accept four parameters with last two as optional parameters. Parameter order should be dateDiff(date.value1,date.value2,date.format1,date.format2). Else if two LONG arguments are sent as first two parameters then parameter order should be dateDiff(timestamp.in.milliseconds1,timestamp.in.milliseconds2).

  • dateFormat ((Function))

    This function returns a formatted date string.If the first argument is a STRING then function accepts three parameters with last parameter as a optional parameter.Parameter order should be dateFormat(dateValue,dateTargetFormat,dateSourceFormat). Else if first argument is a LONG then function accepts two parameters.Parameter order should be dateFormat(timestampInMilliseconds,dateTargetFormat).

  • dateSub ((Function))

    This function returns subtracted specified time interval to a date. If a STRING parameter passed as the first argument then function accepts four parameters with last as optional which is the date.format. If a LONG parameter passed as the first argument, then function accepts three parameters which are timestamp.in.milliseconds,expr,unit in order.

  • dayOfWeek ((Function))

    This function returns the day on which a given date falls.

  • extract ((Function))

    This function returns date attributes from a date expression. If the first argument passed is a STRING then the function will accept three arguments with last parameter as optional which is date.format.Parameter order should be extract(unit,date.value,date.format). Else if the first argument passed is a LONG then function accepts two parameters.Parameter order is extract(timestamp.in.milliseconds,unit).

  • timestampInMilliseconds ((Function))

    This function returns system time or given time in milliseconds.If two STRING parameters are sent as the first argument, the parameter order should be timestampInMilliseconds(date.value,date.format) with last parameter as the optional parameter with is date.format.Else if no argument method invoked then system time will be returned in milliseconds.

  • utcTimestamp ((Function))

    This function returns System time in yyyy-MM-dd HH:mm:ss format

How to Contribute

Contact us

Support

  • We are committed to ensuring support for this extension in production. Our unique approach ensures that all support leverages our open development methodology and is provided by the very same engineers who build the technology.

  • For more details and to take advantage of this unique opportunity contact us via http://wso2.com/support/.

siddhi-execution-time's People

Contributors

suhothayan avatar chathurikaa avatar mohanvive avatar wso2-jenkins-bot avatar grainier avatar dnwick avatar lasanthafdo avatar tishan89 avatar minudika avatar dilini-muthumala avatar hamsav avatar ramindu90 avatar ksdperera avatar maheshika avatar anoukh avatar pcnfernando avatar gokul avatar nirmal070125 avatar

Watchers

James Cloos avatar  avatar

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.