class ZellersCongruence { /** * Calculate day of week using Zeller's Congruence * * For the Gregorian calendar * h =(q + floor(13(m + 1) / 5) + K + floor(K / 4) + floor(J/ 4) + 5J) % 7 * * For Julian calendar * h =(q + floor(13(m + 1) / 5) + K + floor(K / 4) + 5 + 6J) % 7 * * where * h is the day of the week (0 = Saturday, 1 = Sunday, 2 = Monday, ...) * q is the day of the month * m is the month (3 = March, 4 = April, 5 = May, ..., 14 = February) * K the year of the century (year % 100). * J is the century (actually floor(year/100)) (For example, in 1995 the century would be 19, even though it was the 20th century.) * * NOTE: In this algorithm January and February are ...
Install Ruby 1.9 The best and easiest way we've found to install Ruby on Windows is using the RubyInstaller . It's a self-contained Windows installer (an .exe file) that includes a Ruby language execution environment, a baseline set of RubyGems, and documentation. Installers are available for a number of popular Ruby versions. We'll be installing Ruby 1.9.2, the latest Ruby version that's supported for use with Rails 3. On the RubyInstaller downloads page , download the file named Ruby 1.9.2-p290 . You can either download the executable installer (recommended) or the 7-zip archive . The rest of the instructions assume you downloaded the executable installer. Once the executable installer has downloaded, use Windows Explorer to navigate to where you saved the .exe file and double-click it to start the installation process. Off you go, but pay attention to the prompts... ...
Comments
Post a Comment
Post Your Valuable Comments