<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule">

<channel>
	<title>Patryk Zawadzki &#187; Project Hamster</title>
	<atom:link href="http://blogs.gnome.org/patrys/category/project-hamster/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.gnome.org/patrys</link>
	<description>Tales of a whining gnome</description>
	<lastBuildDate>Mon, 14 Mar 2011 01:23:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/2.5/pl/</creativeCommons:license>		<item>
		<title>How to determine the first day of week</title>
		<link>http://blogs.gnome.org/patrys/2008/09/29/how-to-determine-the-first-day-of-week/</link>
		<comments>http://blogs.gnome.org/patrys/2008/09/29/how-to-determine-the-first-day-of-week/#comments</comments>
		<pubDate>Mon, 29 Sep 2008 13:25:48 +0000</pubDate>
		<dc:creator>patrys</dc:creator>
				<category><![CDATA[GNOME]]></category>
		<category><![CDATA[Project Hamster]]></category>
		<category><![CDATA[l10n]]></category>
		<category><![CDATA[locale]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/patrys/?p=15</guid>
		<description><![CDATA[Today we got a report for bug #554256 in Hamster. The first day of week was reported as Sunday for some locales that certainly used Monday. I did some research and found that before Hamster relied on a simple check to determine the result: Run locale first_weekday (by the way, we have to use os.popen [...]]]></description>
			<content:encoded><![CDATA[<p>Today we got a report for <a href="http://bugzilla.gnome.org/show_bug.cgi?id=554256">bug #554256</a> in Hamster. The first day of week was reported as Sunday for some locales that certainly used Monday. I did some research and found that before Hamster relied on a simple check to determine the result:</p>
<ul>
<li>Run <code>locale first_weekday</code> (by the way, we have to use <code>os.popen</code> here as these don&#8217;t seem to be accessible from Python)</li>
<li>If the result is 1, use Sunday, else use Monday (literally, it would treat 2 and 6 as Monday)</li>
</ul>
<p>That seemed to work at least for some countries but was wrong which became apparent when more people started using Hamster (and to put myself in shame: I didn&#8217;t notice this before but it was also broken for me). It seems the correct version is:</p>
<ul>
<li>Run <code>locale first_weekday week-1stday</code></li>
<li>Parse <code>week-1stday</code> as date with <code>%Y%m%d</code></li>
<li>Move the result <code>first_weekday - 1</code> days forward</li>
<li>Check the weekday of the result</li>
</ul>
<h3>Rationale:</h3>
<p>While <code>locale</code> manual pages are horribly outdated, all web searches point to <code>week-1stday</code> as the beginning of the first week of tracked Unix time. <code>first_weekday</code> is the 1-based offset of that week&#8217;s start day. It seems it&#8217;s only there so you can specify <code>first_weekday=2</code> and <code>first_workday=1</code> for the rare cases where working days span across two weeks.</p>
<p>Please do correct me if this is wrong as all of the above are assumptions based on glibc code and Google results. Hope the above helps someone in the future.</p>
<p><strong>Update:</strong> vuntz was kind enough to point me to <code>gtkcalendar.c</code>, part of GTK+. It does the same thing described above so it seems the method is correct.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/patrys/2008/09/29/how-to-determine-the-first-day-of-week/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Happy hamsters</title>
		<link>http://blogs.gnome.org/patrys/2008/08/05/happy-hamsters/</link>
		<comments>http://blogs.gnome.org/patrys/2008/08/05/happy-hamsters/#comments</comments>
		<pubDate>Tue, 05 Aug 2008 10:40:14 +0000</pubDate>
		<dc:creator>patrys</dc:creator>
				<category><![CDATA[Empathy]]></category>
		<category><![CDATA[GNOME]]></category>
		<category><![CDATA[PolicyKit]]></category>
		<category><![CDATA[Project Hamster]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/patrys/2008/08/05/happy-hamsters/</guid>
		<description><![CDATA[Project Hamster is now part of GNOME! Along with Empathy and some blessed external dependencies. Do not underestimate them however for they are some truly powerful libs including libcanberra, Clutter, Conduit and PolicyKit. Some new pains are now (temporarily) part of my life. As PH&#8217;s father, Toms, is away I am the one responsible for [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://live.gnome.org/ProjectHamster">Project Hamster</a> is now <a href="http://mail.gnome.org/archives/devel-announce-list/2008-August/msg00001.html">part of GNOME</a>! Along with Empathy and some blessed external dependencies. Do not underestimate them however for they are some truly powerful libs including libcanberra, Clutter, Conduit and PolicyKit.</p>
<p>Some new pains are now (temporarily) part of my life. As PH&#8217;s father, Toms, is away I am the one responsible for the SVN migration, releasing 2.23.6 and cooperating with i18n and a11y teams. I think we should start by making the stats accessible but I&#8217;ll concentrate on moving to GNOME infrastructure for now. Hope the rest of the team gets their SVN accounts up and running soon.</p>
<p>As for Empathy, great stuff. If you like it as much as I do, you can help me convince Xavier to <a href="http://bugzilla.gnome.org/show_bug.cgi?id=545678">make it a bit prettier and more readable</a>. Hooray for lobbying!</p>
<p><strong>Edit:</strong> hamster-applet 2.23.6 is out, following the upcoming GNOME 2.23.6 release.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/patrys/2008/08/05/happy-hamsters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- This Quick Cache file was built for (  blogs.gnome.org/patrys/category/project-hamster/feed/ ) in 1.18726 seconds, on Feb 10th, 2012 at 6:18 am UTC. -->
<!-- This Quick Cache file will automatically expire ( and be re-built automatically ) on Feb 10th, 2012 at 7:18 am UTC -->
