# geomoment

> moment-timezone, if moment-timezone forced you to choose a particular moment in time. also, some extra sugar.

Latest version **0.6.1** (published 2014-07-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install geomoment
pnpm add geomoment
yarn add geomoment
bun add geomoment
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.6.1 |
| Published | 2014-07-21 |
| First published | 2013-12-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | Max Edmands |
| Maintainers | demands, sherrman |
| Keywords | moment, date, time, timezone, tz, moment-timezone |

## Links

- npm: https://www.npmjs.com/package/geomoment
- Repository: https://github.com/goodeggs/geomoment
- Issues: https://github.com/goodeggs/geomoment/issues
- npm.io page: https://npm.io/package/geomoment

## Alternatives

- [@js-joda/timezone](https://npm.io/package/@js-joda/timezone.md) — 383.4K weekly downloads
- [chartjs-adapter-moment](https://npm.io/package/chartjs-adapter-moment.md) — 210.8K weekly downloads
- [strftime](https://npm.io/package/strftime.md) — 171.2K weekly downloads
- [vue-flatpickr-component](https://npm.io/package/vue-flatpickr-component.md) — 115.8K weekly downloads
- [timepicker](https://npm.io/package/timepicker.md) — 51.0K weekly downloads

## Recent versions

- 0.6.1 (latest) — 2014-07-21
- 0.6.0 — 2014-07-21
- 0.5.3 — 2014-04-25
- 0.5.2 — 2014-04-23
- 0.5.1 — 2014-04-23
- 0.5.0 — 2014-03-20
- 0.4.2 — 2013-12-06
- 0.4.0 — 2013-12-06
- 0.3.2 — 2013-12-05
- 0.3.1 — 2013-12-05
- 0.3.0 — 2013-12-05
- 0.2.1 — 2013-12-05
- 0.2.0 — 2013-12-05
- 0.1.0 — 2013-12-05

## README

# geomoment

[![NPM](https://nodei.co/npm/geomoment.png)](https://nodei.co/npm/geomoment/)
[![Build Status](https://travis-ci.org/goodeggs/geomoment.svg)](https://travis-ci.org/goodeggs/geomoment)

This library is basically just a thin, sugary wrapper over [moment.js](http://momentjs.com/) and [moment-timezone](http://momentjs.com/timezone/).

## What can it do?

```javascript
var geomoment = require('geomoment');

// Timezone sugar
geomoment.pacific('2013-01-01', 'YYYY-MM-DD')
geomoment.eastern('2013-02-08 09:30:26.123')
geomoment.central.tzid

// Day string sugar
geomoment.day('2013-01-01', geomoment.pacific.tzid)
geomoment.day('20101221', geomoment.central.tzid)
geomoment().dayString() // => '2013-01-01'

// Date formats (see below for a complete list)
geomoment.formats.day         = 'YYYY-MM-DD'    // 2013-01-01

// Stubbing time
geomoment.stubTime(geomoment.pacific('2013-01-01'));
geomoment().dayString(); // => '2013-01-01'
geomoment.restoreTime();
geomoment().dayString(); // => today's date
```

See also: [geomoment-angular](https://github.com/goodeggs/geomoment-angular) for use in an [angular.js](http://angularjs.org) project.

## Date formats

<table>
  <tr>
    <th>day</th>
    <td>2013-12-06</td>
    <td><code>YYYY-MM-DD</code></td>
  </tr>
  <tr>
    <th>time</th>
    <td>15:22</td>
    <td><code>HH:mm</code></td>
  </tr>
  <tr>
    <th>dayTime</th>
    <td>2013-12-06 15:22</td>
    <td><code>YYYY-MM-DD HH:mm</code></td>
  </tr>
  <tr>
    <th>iCalDay</th>
    <td>20131206</td>
    <td><code>YYYYMMDD</code></td>
  </tr>
  <tr>
    <th>iCalTime</th>
    <td>152207</td>
    <td><code>HHmmss</code></td>
  </tr>
  <tr>
    <th>iCalDayTime</th>
    <td>20131206T152207</td>
    <td><code>YYYYMMDD[T]HHmmss</code></td>
  </tr>
  <tr>
    <th>slashDay</th>
    <td>12/6/2013</td>
    <td><code>M/D/YYYY</code></td>
  </tr>
  <tr>
    <th>shortSlashDay</th>
    <td>12/6</td>
    <td><code>M/D</code></td>
  </tr>
  <tr>
    <th>shortDay</th>
    <td>Friday, Dec 6</td>
    <td><code>dddd, MMM D</code></td>
  </tr>
  <tr>
    <th>abbrvDay</th>
    <td>Fri Dec 6</td>
    <td><code>ddd MMM D</code></td>
  </tr>
  <tr>
    <th>longDay</th>
    <td>Friday, December 6, 2013</td>
    <td><code>dddd, MMMM D, YYYY</code></td>
  </tr>
  <tr>
    <th>weekday</th>
    <td>Friday</td>
    <td><code>dddd</code></td>
  </tr>
  <tr>
    <th>unixDate</th>
    <td>Fri Dec 06 2013 15:22:07</td>
    <td><code>ddd MMM DD YYYY HH:mm:ss</code></td>
  </tr>
</table>

## License

The MIT License (MIT)

Copyright (c) 2013 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.

---
_Source: https://npm.io/package/geomoment · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
