ChathuraHettiarachchi / Timeago

Licence: apache-2.0
This will help to get how much time have passed. Useful in showing messages, notifications time and etc.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Timeago

Popmodal
jquery plugin for showing tooltips, titles, modal dialogs and etc
Stars: ✭ 149 (-11.83%)
Mutual labels:  notifications
Prayer Times Android
A useful Application with a set of tools needed by any muslim.
Stars: ✭ 158 (-6.51%)
Mutual labels:  notifications
Onesignal Unity Sdk
OneSignal is a free push notification service for mobile apps. This plugin makes it easy to integrate your Unity app with OneSignal. https://onesignal.com
Stars: ✭ 161 (-4.73%)
Mutual labels:  notifications
Notifiers
The easy way to send notifications
Stars: ✭ 2,034 (+1103.55%)
Mutual labels:  notifications
Alertifyjs
A javascript framework for developing pretty browser dialogs and notifications.
Stars: ✭ 1,922 (+1037.28%)
Mutual labels:  notifications
Django Herald
A Django messaging library
Stars: ✭ 159 (-5.92%)
Mutual labels:  notifications
Svelte Notifications
Svelte toast notifications component that can be used in any JS application
Stars: ✭ 146 (-13.61%)
Mutual labels:  notifications
Bitprophet
Node crypto trading platform for Binance exchange.
Stars: ✭ 166 (-1.78%)
Mutual labels:  notifications
Electron Push Receiver
A module to bring Web Push support to Electron allowing it to receive notifications from Firebase Cloud Messaging (FCM).
Stars: ✭ 158 (-6.51%)
Mutual labels:  notifications
Vue Notifyjs
Minimalist 1kb Notification component
Stars: ✭ 160 (-5.33%)
Mutual labels:  notifications
Notyf
👻 A minimalistic, responsive, vanilla JavaScript library to show toast notifications.
Stars: ✭ 2,093 (+1138.46%)
Mutual labels:  notifications
Zroya
[Partialy working][Stale] Python extension for creating native Windows notifications.
Stars: ✭ 154 (-8.88%)
Mutual labels:  notifications
Nativescript Local Notifications
📫 NativeScript plugin to easily schedule local notifications
Stars: ✭ 159 (-5.92%)
Mutual labels:  notifications
Rpush
The push notification service for Ruby.
Stars: ✭ 1,886 (+1015.98%)
Mutual labels:  notifications
Screamer Js
Screamer.js is a Vanilla Javascript plugin to provide simple yet fully customisable web notifications using Web Notifications API.
Stars: ✭ 161 (-4.73%)
Mutual labels:  notifications
Zebra dialog
A small, compact, and highly configurable jQuery plugin for creating beautiful modal dialog boxes
Stars: ✭ 147 (-13.02%)
Mutual labels:  notifications
Notistack
Highly customizable notification snackbars (toasts) that can be stacked on top of each other
Stars: ✭ 2,562 (+1415.98%)
Mutual labels:  notifications
Ember Cli Notifications
⚛ Atom inspired notification messages for ember-cli
Stars: ✭ 168 (-0.59%)
Mutual labels:  notifications
Autoya
thin framework for Unity.
Stars: ✭ 165 (-2.37%)
Mutual labels:  notifications
React Toast Notifications
🍞 A toast notification system for react
Stars: ✭ 2,103 (+1144.38%)
Mutual labels:  notifications

TimeAgo Download

I know what is mostly experianced problem when doing my development. So I decide to write this library to get how much time passed. Many of us having problem how to show how much time have passed, how to show it like in messages, notifications... Yeah, you looking at the right place. This will fix your issue.

logo

####Let's take a look how to add this to your project

For the android project just include the following dependency inside you buil.gradle's depedency list.

Gradle

repositories {
  jcenter()
}

dependencies {
    ...
    compile 'com.chootdev:timezago:1.1.8'
}

if you using maven use following Maven

<dependency>
  <groupId>com.chootdev</groupId>
  <artifactId>timezago</artifactId>
  <version>1.1.8</version>
  <type>pom</type>
</dependency>

After setup installing lib to your project you just need only to calls it using just two lines of code. It will return you a string with the resuls.

Usage

TimeAgo timeAgo = new TimeAgo();
String result = timeAgo.getTimeAgo(YOUR_PAST_DATE);
TimeAgo timeAgo = new TimeAgo().locale(CONTEXT).with(CUSTOM_DATE_FORMAT);
String result = timeAgo.getTimeAgo(YOUR_CUSTOM_PAST_DATE);

Limitations

  • Currently not supporting for custom date formats. supports for ISO foramt and dd/MM/yyyy HH:mm:ss only.
  • Some parts like reducing time from your input date need to manage by you, and i was planning to add those line in future too.

Output patterns

  • Below 1min - Right now
  • 1min - 1h - returns like 20 minutes
  • 1h - 24h - time eg: 12.34pm
  • 1d - 1w - 1 week ago
  • 1w - 4w - 1 week ago, 2 weeks ago 3 weeks ago
  • 1m > - date

Screenshot

src

Changelog

  • 1.1.8
    • Format changes
  • 1.1.7
    • Added ru localization, changed min API from 16 to 9, custom date format
  • 1.1.6
    • Fixed grammer issues
  • 1.1.5
    • Stable the release
  • 1.1.0
    • Fixed crashing for ISO date format
  • 1.0.0
    • Initial release

Author

Chathura Hettiarachchi, [email protected]

Checkout my other contributions, https://github.com/ChathuraHettiarachchi?tab=repositories

License

Copyright 2016 Chathura Hettiarachchi

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].