Automatically add scopes for day, week, month and year ranges to Active Record models.
DateParser is a simple, fast, and effective way to parse dates from natural language text.
Calculate the horoscope of a person given the birth date and time
Some handy utils to deal with Date
Dates passed in by date-pickers or text-input fields to a rails controller need to be converted to a ruby Date to be able to be saved and manipulated. This gem provides a simple controller add-on to facilitate the conversion.
Format numbers and dates according to The New York Times Manual of Style
Humans want to think of date and datetime attributes in a natural manner. Standard ruby Date and DateTime objects do not support this well.
Enhance I18n#localize to use parsi digits and Jalali dates in Farsi locale
A collection of helpful methods and monkey patches for Objects, Strings, Enumerables, Arrays, Hash, Dates, Minitest & Rails
Generate date objects from a date duration string (eg. 'September 9th-12th, 2012')
View helpers to make your Dates and Times more human like
MultiDatesPicker for Rails
Adds time-only capabilities to the Time class and maps the Rails time type correctly to a time without date.
Implements the Discordian calendar, printing out the current date
Adds the method Date#years_months_days_since which returns the number of days, months and years since another date
Provides SMTP STARTTLS support for Ruby 1.8.6 (built-in for 1.8.7+). Simply require 'smtp_tls' and use the Net::SMTP#enable_starttls method to talk to servers that use STARTTLS. require 'net/smtp' begin require 'smtp_tls' rescue LoadError end smtp = Net::SMTP.new address, port smtp.enable_starttls smtp.start Socket.gethostname, user, password, authentication do |server| server.send_message message, from, to end You can also test your SMTP connection settings using mail_smtp_tls: $ date | ruby -Ilib bin/mail_smtp_tls smtp.example.com submission \ "your username" "your password" plain \ from@example.com to@example.com Using SMTP_TLS 1.0.3 -> "220 smtp.example.com ESMTP XXX\r\n" <- "EHLO you.example.com\r\n" -> "250-smtp.example.com at your service, [192.0.2.1]\r\n" -> "250-SIZE 35651584\r\n" -> "250-8BITMIME\r\n" -> "250-STARTTLS\r\n" -> "250-ENHANCEDSTATUSCODES\r\n" -> "250 PIPELINING\r\n" <- "STARTTLS\r\n" -> "220 2.0.0 Ready to start TLS\r\n" TLS connection started <- "EHLO you.example.com\r\n" -> "250-smtp.example.com at your service, [192.0.2.1]\r\n" -> "250-SIZE 35651584\r\n" -> "250-8BITMIME\r\n" -> "250-AUTH LOGIN PLAIN\r\n" -> "250-ENHANCEDSTATUSCODES\r\n" -> "250 PIPELINING\r\n" <- "AUTH PLAIN BASE64_STUFF_HERE\r\n" -> "235 2.7.0 Accepted\r\n" <- "MAIL FROM:<from@example.com>\r\n" -> "250 2.1.0 OK XXX\r\n" <- "RCPT TO:<to@example.com>\r\n" -> "250 2.1.5 OK XXX\r\n" <- "DATA\r\n" -> "354 Go ahead XXX\r\n" writing message from String wrote 91 bytes -> "250 2.0.0 OK 1247028988 XXX\r\n" <- "QUIT\r\n" -> "221 2.0.0 closing connection XXX\r\n" This will connect to smtp.example.com using the submission port (port 587) with a username and password of "your username" and "your password" and authenticate using plain-text auth (the submission port always uses SSL) then send the current date to to@example.com from from@example.com. Debug output from the connection will be printed on stderr.
CalendarDateSelect is semi-light-weight and easy to use! It takes full advantage of the prototype.js library, resulting in less code, but maintaining a great deal of functionality. Project site: http://code.google.com/p/calendardateselect/
Use jQuery UI's date picker with formtastic easily
Jekyll Archive Generator creates a set of archive pages for a Jekyll website. Oddly, Jekyll doesn't include a date-based archive for posts out of the box. For example, if you have a permalink structure like `blog/2014/01/01/title, URL hacking won't work because going to `blog/2014` will return 404 Page Not Found. Jekyll Archive Generator fixes that by generating all the necessary archive pages for each part your blog URL structure.
A library allows to select date and time.
Direct Address provides a rails app with simple address features. This is a streamlined implementation of address functionality. Direct Address provides you with address, country, and region classes. It also provides a generator which generates the necessary javascript and rake tasks to implement properly. You'll also get form helpers to easily implement Direct Address in your views. A rake task is provided that allows up to date country and region information to be downloaded from geoname.org.
Adds a simple macro, has_date_scopes to ActiveRecord. When used it adds a number of convinience scopes to your models relating to a whether a particular date field on that model is in the past or future. It also has other handy features.
Orders and completes SSL certificate trust chains, maintains an up-to-date pool of viable intermediates and trusted roots, and provides other tooling for dealing with SSL certificate and key woes.
Simple rails engine that uses ajax to ping Chronic, giving users imediate feedback regarding the date they entered in a text field.
Date formatter with time zone support
Adds some useful methods to the Date class.
Google Book/Magazine API integration for fetching the information for google books and magazines and book shelves also filter them. You can eaisly get most of the elements for a particular book and magazine or the books of a book shelf from the google book search. like :-(title,sub title,preview link,authors,publisher,publish date,buylink,downloadlink,version,ISBN information,ratings,...many more..Also you can get the google checkout link for that book/magazine
Value Value is a library for defining immutable value objects in Ruby. A value object is an object whose equality to other objects is determined by its value, not its identity, think dates and amounts of money. A value object should also be immutable, as you don’t want the date “2013-04-22” itself to change but the current date to change from “2013-04-22” to “2013-04-23”. That is, you don’t want entries in a calendar for 2013-04-22 to move to 2013-04-23 simply because the current date changes from 2013-04-22 to 2013-04-23. A value object consists of one or more attributes stored in instance variables. Value sets up an #initialize method for you that let’s you set these attributes, as, value objects being immutable, this’ll be your only chance to do so. Value also adds equality checks ‹#==› and ‹#eql?› (which are themselves equivalent), a ‹#hash› method, a nice ‹#inspect› method, and a protected attribute reader for each attribute. You may of course add any additional methods that your value object will benefit from. That’s basically all there’s too it. Let’s now look at using the Value library. § Usage You create value object class by invoking ‹#Value› inside the class (module) you wish to make into a value object class. Let’s create a class that represent points on a plane: class Point Value :x, :y end A ‹Point› is thus a value object consisting of two sub-values ‹x› and ‹y› (the coordinates). Just from invoking ‹#Value›, a ‹Point› object will have a constructor that takes two arguments to set instance variables ‹@x› and ‹@y›, equality checks ‹#==› and ‹#eql?› (which are the same), a ‹#hash› method, a nice ‹#inspect› method, and two protected attribute readers ‹#x› and ‹#y›. We can thus already creat ‹Point›s: origo = Point.new(0, 0) The default of making the attribute readers protected is often good practice, but for a ‹Point› it probably makes sense to be able to access its coordinates: class Point public(*attributes) end This’ll make all attributes of ‹Point› public. You can of course choose to only make certain attributes public: class Point public :x end Note that this public is standard Ruby functionality. Adding a method to ‹Point› is of course also possible and very much Rubyish: class Point def distance(other) Math.sqrt((other.x - x)**2 + (other.y - y)**2) end end For some value object classes you might want to support optional attributes. This is done by providing a default value for the attribute, like so: class Money Value :amount, [:currency, :USD] end Here, the ‹currency› attribute will default to ‹:USD›. You can create ‹Money› via dollars = Money.new(2) but also kronor = Money.new(2, :SEK) All required attributes must come before any optional attributes. Splat attributes are also supported: class List Value :'*elements' end empty = List.new suits = List.new(:spades, :hearts, :diamonds, :clubs) Splat attributes are optional. Finally, block attributes are also available: class Block Value :'&block' end block = Block.new{ |e| e * 2 } Block attributes are optional. Comparison beyond ‹#==› is possible by specifingy the ‹:comparable› option to ‹#Value›, listing one or more attributes that should be included in the comparison: class Vector Value :a, :b, :comparable => :a end Note that equality (‹#==› and ‹#eql?›) is always defined based on all attributes, regardless of arguments to ‹:comparable›. Here we say that comparisons between ‹Vector›s should be made between the values of the ‹a› attribute only. We can also make comparisons between all attributes of a value object: class Vector Value :a, :b, :comparable => true end To sum things up, let’s use all possible arguments to ‹#Value› at once: class Method Value :file, :line, [:name, 'unnamed'], :'*args', :'&block', :comparable => [:file, :line] end A ‹Method› consists of file and line information, a possible name, some arguments, possibly a block, and is comparable on the file and line on which they appear. Check out the {full API documentation}¹ for a more explicit description, should you need it or should you want to extend it. ¹ See http://disu.se/software/value/api/ § Financing Currently, most of my time is spent at my day job and in my rather busy private life. Please motivate me to spend time on this piece of software by donating some of your money to this project. Yeah, I realize that requesting money to develop software is a bit, well, capitalistic of me. But please realize that I live in a capitalistic society and I need money to have other people give me the things that I need to continue living under the rules of said society. So, if you feel that this piece of software has helped you out enough to warrant a reward, please PayPal a donation to now@disu.se¹. Thanks! Your support won’t go unnoticed! ¹ Send a donation: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=now%40disu%2ese&item_name=Value § Reporting Bugs Please report any bugs that you encounter to the {issue tracker}¹. ¹ See https://github.com/now/value/issues § Authors Nikolai Weibull wrote the code, the tests, the manual pages, and this README. § Licensing Value is free software: you may redistribute it and/or modify it under the terms of the {GNU Lesser General Public License, version 3}¹ or later², as published by the {Free Software Foundation}³. ¹ See http://disu.se/licenses/lgpl-3.0/ ² See http://gnu.org/licenses/ ³ See http://fsf.org/
"Enhances ActionView with a customizable date select form helper where any valid HTML attribute can be applied."
Date and time validation plugin for Rails 2.x which allows custom formats
Work with period of dates in a easy way. This gem provides functionalities like workdays, date as string and period to calendars.
ApplixHash#from_argv builds hashes from ARGV like argument vectors according to following examples: '-f' --> { :f => true } '--flag' --> { :flag => true } '--flag:false' --> { :flag => false } '--flag=false' --> { :flag => 'false' } '--option=value' --> { :option => "value" } '--int=1' --> { :int => "1" } '--float=2.3' --> { :float => "2.3" } '--float:2.3' --> { :float => 2.3 } '--txt="foo bar"' --> { :txt => "foo bar" } '--txt:'"foo bar"'' --> { :txt => "foo bar" } '--txt:%w{foo bar}' --> { :txt => ["foo", "bar"] } '--now:Time.now' --> { :now => #<Date: 3588595/2,0,2299161> } remaining arguments(non flag/options) are inserted as [:arguments, args], eg: Hash.from_argv %w(--foo --bar=loo 123 now) becomes { :foo => true, :bar => 'loo', :arguments => ["123", "now"] }
Spree Active Sale makes it easy to handle flash sale/ daily deals behavior with in a spree application. By this, you can have a variant, product, or group number of products in a taxon, attach that variant, product, or taxon to a sale event with a start and end date for scheduling. So that, your sale event will only be available between the dates given and when the sale is gone(i.e. not live), it will not be accessible at any point till you create a new one or re-schedule the same.
Returns the date for Easter, Ash Wednesday, Palm Sunday, Good Friday, Ascension Day, and Pentecost.
A Rails plugin that provides _formatted methods for date fields.
Reconocimiento de fechas y periodos en lenguaje natural. Natural language date and period parsing in spanish.
Fiscal Year Date Functions
The official IP2Proxy Ruby library to detect VPN servers, open proxies, web proxies, Tor exit nodes, search engine robots, data center ranges and residential proxies using IP2Proxy BIN database. Other information available includes proxy type, country, state, city, ISP, domain name, usage type, AS number, AS name, threats, last seen date and provider names.
todo_lint can be integrated into a continuous integration workflow to keep todo comments from becoming stagnant over time. Just annotate the comment with a date, and if that date has passed, your build will fail, and you'll be reminded to snooze the todo a little later, or finally address it.
abstract_feature_branch is a Ruby gem that provides a unique variation on the Branch by Abstraction Pattern by Paul Hammant and the Feature Toggles Pattern by Martin Fowler to enhance team productivity and improve software fault tolerance. It provides the ability to wrap blocks of code with an abstract feature branch name, and then specify in a configuration file which features to be switched on or off. The goal is to build out upcoming features in the same source code repository branch (i.e. Continuous Integration and Trunk-Based Development), regardless of whether all are completed by the next release date or not, thus increasing team productivity by preventing integration delays. Developers then disable in-progress features until they are ready to be switched on in production, yet enable them locally and in staging environments for in-progress testing. This gives developers the added benefit of being able to switch a feature off after release should big problems arise for a high risk feature. abstract_feature_branch additionally supports Domain Driven Design's pattern of Bounded Contexts by allowing developers to configure context-specific feature files if needed. abstract_feature_branch is one of the simplest and most minimalistic "Feature Flags" Ruby gems out there as it enables you to get started very quickly by simply leveraging YAML files without having to set up a data store if you do not need it (albeit, you also have the option to use Redis as a very fast in-memory data store).
Library tht returns the beginning and ending Gregorian (civil) dates for months in the broadcast calendar.
ice_cube_english provides english time and date parsing for ice_cube.
Adds String#valid_date? method to add utility to the Rails String#to_date method. Determines whether the string contains a valid date, to check before converting to a date and avoiding an exception.
Incremental Dated Backups Using Rsync
Korean lunar date, solar date two-way convert library
wrapper of date_time using date_time-duration
Simple pop up widget for picking a date and time. Also can set reminders and alerts
A plugin for formtastic to integrate calendar_date_select date/time picker
Rails Date formatting and parsing per request via Date.format.
Useful extensions to Date, String, Range and other classes including useful Date extensions for dealing with US Federal and New York Stock Exchange holidays and working days, a useful Enumerable#each_with_flags for flagging first and last items in the iteration, (also for Hash), set operations on Ranges