Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

geomoment-angular

Package Overview
Dependencies
Maintainers
2
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

geomoment-angular

An angular module for date formatting; wraps geomoment. For use with browserify.

  • 0.10.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

geomoment-angular

An angular.js module for date formatting with explicit timezones; wraps geomoment.

examples

setup:

angular.module('my-module', ['geomoment']);

service:

injectedFunction = ['geomoment', function(geomoment) {
  geomoment.day('2013-02-08');
}];

filters:

Filter exampleResult
{{'2013-02-08T09:30' | formatDate:tzid:'h:mm:ssa'}}9:30:00am
{{'2013-02-08' | formatDay:'weekday'}}Friday
{{'2013-02-08T09:30' | addTime:'days':1 | formatDay:'MMM Do YYYY'}}Feb 9th 2013
{{'2013-02-08T09:30' | subtractTime:'hours':9 | formatDate:tzid:'h:mma'}}12:30am

directive:

<form name='dateForm'>
  <input ngModel='date' geomoment='YYYY-MM-DD h:mm a' tzid='America/Los_Angeles'>
</form>

The geomoment directive will convert a string representation of a date (expressed in the geomoment attr) into a javascript Date object. It uses the geomoment library to parse input dates, so it does a pretty good job of interpolating human input.

License

The MIT License (MIT)

Copyright (c) 2014 Good Eggs Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Keywords

FAQs

Package last updated on 22 Jul 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc