SweeyaCoreExt is group of core extensions. It adds funcionalities to classes:
-
Time
-
to_nicedate - returns time and in Slovenian format (%d.%m.%Y %H:%M)
-
to_nicetime - returns time and in Slovenian format (%H:%M)
-
-
Date
-
to_nicedate - returns date in Slovenian format (%d.%m.%Y)
-
slovenian_month_short - returns month in Slovenian - short form e.g. Jan, Feb etc
-
slovenian_month_long - returns month in Slovenian - long form e.g. Januar, Februar etc
-
to_named_date - returns date in format ‘Ponedelje, 21.12.2011’
-
-
Datetime
-
to_slovenian_date - returns date in form ‘Ponedeljek, 22.4.1999 ob 17:00’, slovenian day names are used
-
-
String
-
nl2br - replaces \n with <br />
-
linkify - finds all urls, emails in string and returns them as links
-
urlize - replaces all non ascii chars with ‘-’
-
smart_split(n) - returns n chars from text, if there is no space at n char, then it gets word till the end
-
md5 - returns md5 hash of a string
-
Add following line to Gemfile:
gem 'sweeya_core_ext',:require=>'sweeya_core_ext' ,:git=>'git://github.com/radiokills/sweeya_core_ext.git'
-
Check out the latest master to make sure the feature hasn’t been implemented or the bug hasn’t been fixed yet
-
Check out the issue tracker to make sure someone already hasn’t requested it and/or contributed it
-
Fork the project
-
Start a feature/bugfix branch
-
Commit and push until you are happy with your contribution
-
Make sure to add tests for it. This is important so I don’t break it in a future version unintentionally.
-
Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
Copyright © 2011 radiokills. See LICENSE.txt for further details.