{"id":22981032,"url":"https://github.com/rubyworks/richunits","last_synced_at":"2025-09-01T08:37:57.342Z","repository":{"id":662209,"uuid":"305185","full_name":"rubyworks/richunits","owner":"rubyworks","description":"Units System (like Rails)","archived":false,"fork":false,"pushed_at":"2013-03-09T15:40:10.000Z","size":826,"stargazers_count":5,"open_issues_count":4,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-09-19T05:44:01.376Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://rubyworks.github.com/richunits","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rubyworks.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2009-09-12T18:09:18.000Z","updated_at":"2014-12-25T08:56:30.000Z","dependencies_parsed_at":"2022-08-16T10:35:23.896Z","dependency_job_id":null,"html_url":"https://github.com/rubyworks/richunits","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubyworks%2Frichunits","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubyworks%2Frichunits/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubyworks%2Frichunits/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubyworks%2Frichunits/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rubyworks","download_url":"https://codeload.github.com/rubyworks/richunits/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229773540,"owners_count":18122031,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-15T01:46:47.544Z","updated_at":"2024-12-15T01:46:47.958Z","avatar_url":"https://github.com/rubyworks.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RichUnits\n\n[Website](http://rubyworks.github.com/richunits) /\n[Documentation](http://rubydoc.info/gems/richunits/frames) /\n[Report Issue](http://github.com/rubyworks/richunits/issues) /\n[Source Code](http://github.com/rubyworks/richunits)\n\n[![Gem Version](https://badge.fury.io/rb/richunits.png)](http://badge.fury.io/rb/richunits)\n[![Build Status](https://travis-ci.org/rubyworks/richunits.png)](https://travis-ci.org/rubyworks/richunits) \u0026nbsp; \u0026nbsp;\n[![Flattr Me](http://api.flattr.com/button/flattr-badge-large.png)](http://flattr.com/thing/324911/Rubyworks-Ruby-Development-Fund)\n\n\n## About\n\nRichUnits is simple units system based on Rich Kilmer's original\ntime.rb script, in which different measures of time are represented\nas seconds via extensions to the Numeric class. Later, Ruby on Rails'\nActiveSupport library adopted this script and expanded upon it.\nRichUnits borrows from their work and a few other renditions this code\nthat have made the rounds to create a robust stand-alone version.\n\nUnique to RichUnits' rendition is the Duration class (inspired by Matthew\nHarris' version by the same name). Originally time measures were stored as\nintegers representing seconds. The Duration class instead stores the seconds\nas an attribute and adds an optional segements property which can be used to\nselect exactly how to segment up the time period (years, week, days, etc.).\n\n\n## Usage\n\nYou only need to require 'richunits' and all of RichUnit's functionality\nbecomes available.\n\n    require 'richunits'\n\n    2.hours  #=\u003e 7200\n\nSee RDocs for complete API documentation.\n\n\n## Development\n\nRichUnits utilizes GitHub for development. You will find the git \nrepo under the rubyworks account.\n\n    git://github.com/rubyworks/richunits.git\n\nRichUnits utilizes the Syckle build system.\n\n\n## Copyrights\n\n* Copyright (c) 2008 Rubyworks\n* Copyright (c) 2006 Matthew Harris\n* Copyright (c) 2004 Rich Kilmer\n\nIf you have contributed to this code and feel you deserve mention\nin the copyright notice, please let me know. Since this code has\nbeen through a number of hands and other projects (Facets and\nActiveSupport among them) it is hard to identify exactly who is\nresponsible for what. Nonetheless, Rich Kilmer is the initiator\nof the whole idea (AFAIK), so I figure much of the rights belong\nto him.\n\nRichUnits is distributed under the terms of the MIT license.\n\nSee LICENSE.txt file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubyworks%2Frichunits","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frubyworks%2Frichunits","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubyworks%2Frichunits/lists"}