<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title>Gurus on Software</title>
		<link>http://swguru.kr/</link>
		<description>handol, SW Maestro Mentor (2011), how to beat Google, open platforms, cloud computing and infra, @handol00</description>
		<language>ko</language>
		<pubDate>Wed, 12 Oct 2011 11:17:42 +0900</pubDate>
		<generator>Tistory 1.1 (http://www.tistory.com/)</generator>
		<image>
		<title>Gurus on Software</title>
		<url><![CDATA[http://cfile29.uf.tistory.com/image/120BE3344E93C1C42244CF]]></url>
		<link>http://swguru.kr/</link>
		<description>handol, SW Maestro Mentor (2011), how to beat Google, open platforms, cloud computing and infra, @handol00</description>
		</image>
		<item>
			<title>[python] 날짜, 시간 datetime.date,  datetime.datetime</title>
			<link>http://swguru.kr/1</link>
			<description>&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(51, 51, 51); font-family: 굴림; &quot;&gt;&lt;span style=&quot;font-size: 10pt; &quot;&gt;기능:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: 10pt; &quot;&gt;며칠전부터 오늘까지 일자별로 처리하기.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: 10pt; &quot;&gt;며칠전부터 오늘까지 시간별로 처리하기.&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; &quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;font class=&quot;Apple-style-span&quot; size=&quot;2&quot;&gt;&amp;nbsp;&lt;/font&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 12px; line-height: 18px; &quot;&gt;&lt;span style=&quot;font-size: 10pt; &quot;&gt;&lt;br /&gt;
소스:&amp;nbsp;&lt;/span&gt;&lt;div class=&quot;txc-textbox&quot; style=&quot;border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-color: rgb(238, 238, 238); border-right-color: rgb(238, 238, 238); border-bottom-color: rgb(238, 238, 238); border-left-color: rgb(238, 238, 238); background-color: rgb(254, 254, 184); padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px; &quot;&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;&lt;/p&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;&lt;span style=&quot;font-size: 10pt; &quot;&gt;import time&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;&lt;span style=&quot;font-size: 10pt; &quot;&gt;import datetime&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;&lt;font class=&quot;Apple-style-span&quot; size=&quot;2&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 19px; &quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;&lt;span style=&quot;font-size: 10pt; &quot;&gt;# refer: http://docs.python.org/library/datetime.html&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;&lt;br /&gt;
&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;&lt;span style=&quot;font-size: 10pt; &quot;&gt;# step = 1 day. use &#039;&lt;b&gt;date&lt;/b&gt;&#039; object&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;&lt;span style=&quot;font-size: 10pt; &quot;&gt;oneday = datetime.&lt;b&gt;timedelta&lt;/b&gt;(days=1)&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;&lt;span style=&quot;font-size: 10pt; &quot;&gt;startday = datetime.&lt;b&gt;date&lt;/b&gt;(2011, 10, 6)&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;&lt;span style=&quot;font-size: 10pt; &quot;&gt;today = datetime.date.today()&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;&lt;span style=&quot;font-size: 10pt; &quot;&gt;#today = datetime.date.fromtimestamp(time.time())&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;&lt;br /&gt;
&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;&lt;span style=&quot;font-size: 10pt; &quot;&gt;while startday &amp;lt; today:&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;&lt;span style=&quot;font-size: 10pt; &quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print startday, startday.isoformat()&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;&lt;span style=&quot;font-size: 10pt; &quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; startday += oneday&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;&lt;br /&gt;
&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;&lt;br /&gt;
&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;&lt;span style=&quot;font-size: 10pt; &quot;&gt;# step = 1 hour. use &#039;&lt;b&gt;datetime&lt;/b&gt;&#039; object&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;&lt;span style=&quot;font-size: 10pt; &quot;&gt;onehour = datetime.&lt;b&gt;timedelta&lt;/b&gt;(hours=1)&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;&lt;span style=&quot;font-size: 10pt; &quot;&gt;startday = datetime.&lt;b&gt;datetime&lt;/b&gt;(2011, 10, 6, hour=11)&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;&lt;span style=&quot;font-size: 10pt; &quot;&gt;#today = datetime.datetime.fromtimestamp(time.time())&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;&lt;span style=&quot;font-size: 10pt; &quot;&gt;today = datetime.datetime.today()&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;&lt;br /&gt;
&lt;/p&gt;&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;&lt;span style=&quot;font-size: 10pt; &quot;&gt;while startday &amp;lt; today:&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;&lt;span style=&quot;font-size: 10pt; &quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print startday, startday.isoformat&lt;b&gt;(&#039; &#039;),&lt;/b&gt;&amp;nbsp;startday.strftime&lt;b&gt;(&#039;%Y-%m-%d-%H&#039;)&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;&lt;span style=&quot;font-size: 10pt; &quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; startday += onehour&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;/div&gt;&lt;/span&gt;&lt;br /&gt;
&lt;font class=&quot;Apple-style-span&quot; size=&quot;2&quot;&gt;실행결과:&lt;/font&gt;&lt;br /&gt;
&lt;br /&gt;&lt;div class=&quot;txc-textbox&quot; style=&quot;border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-color: rgb(254, 254, 184); border-right-color: rgb(254, 254, 184); border-bottom-color: rgb(254, 254, 184); border-left-color: rgb(254, 254, 184); background-color: rgb(254, 254, 184); padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px; &quot;&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;&lt;/p&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;&lt;font class=&quot;Apple-style-span&quot; size=&quot;2&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 19px; &quot;&gt;2011-10-06 2011-10-06&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;&lt;font class=&quot;Apple-style-span&quot; size=&quot;2&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 19px; &quot;&gt;2011-10-07 2011-10-07&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;&lt;font class=&quot;Apple-style-span&quot; size=&quot;2&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 19px; &quot;&gt;2011-10-08 2011-10-08&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;&lt;font class=&quot;Apple-style-span&quot; size=&quot;2&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 19px; &quot;&gt;2011-10-09 2011-10-09&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;&lt;font class=&quot;Apple-style-span&quot; size=&quot;2&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 19px; &quot;&gt;2011-10-10 2011-10-10&lt;br /&gt;
&amp;nbsp;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;&lt;font class=&quot;Apple-style-span&quot; size=&quot;2&quot;&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;&lt;font class=&quot;Apple-style-span&quot; size=&quot;2&quot;&gt;2011-10-06 11:00:00 2011-10-06 11:00:00 2011-10-06-11&lt;/font&gt;&lt;/p&gt;
&lt;font class=&quot;Apple-style-span&quot; size=&quot;2&quot;&gt;&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;2011-10-06 12:00:00 2011-10-06 12:00:00 2011-10-06-12&lt;/p&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;2011-10-06 13:00:00 2011-10-06 13:00:00 2011-10-06-13&lt;/p&gt;
&lt;p style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; &quot;&gt;2011-10-06 14:00:00 2011-10-06 14:00:00 2011-10-06-14&lt;/p&gt;
&lt;div style=&quot;line-height: 19px; &quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/font&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;/span&gt;&lt;div class=&quot;entry-ccl&quot; style=&quot;clear: both; text-align: right; margin-bottom: 10px&quot;&gt;
	&lt;img id=&quot;ccl-icon-1-0&quot; class=&quot;entry-ccl-by&quot; src=&quot;http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black01.png&quot; alt=&quot;저작자 표시&quot;/&gt;
	&lt;img id=&quot;ccl-icon-1-1&quot; class=&quot;entry-ccl-nc&quot; src=&quot;http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black02.png&quot; alt=&quot;비영리&quot;/&gt;
	&lt;img id=&quot;ccl-icon-1-2&quot; class=&quot;entry-ccl-nd&quot; src=&quot;http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black03.png&quot; alt=&quot;변경 금지&quot;/&gt;
	&lt;!--
	&lt;rdf:RDF xmlns=&quot;http://web.resource.org/cc/&quot; xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot; xmlns:rdf=&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot;&gt;
		&lt;Work rdf:about=&quot;&quot;&gt;
			&lt;license rdf:resource=&quot;http://creativecommons.org/licenses/by-nc-nd/2.0/kr/&quot; /&gt;
		&lt;/Work&gt;
		&lt;License rdf:about=&quot;http://creativecommons.org/licenses/by-nc-nd/&quot;&gt;
			&lt;permits rdf:resource=&quot;http://web.resource.org/cc/Reproduction&quot;/&gt;
			&lt;permits rdf:resource=&quot;http://web.resource.org/cc/Distribution&quot;/&gt;
			&lt;requires rdf:resource=&quot;http://web.resource.org/cc/Notice&quot;/&gt;
			&lt;requires rdf:resource=&quot;http://web.resource.org/cc/Attribution&quot;/&gt;
			&lt;prohibits rdf:resource=&quot;http://web.resource.org/cc/CommercialUse&quot;/&gt;
		&lt;/License&gt;
	&lt;/rdf:RDF&gt;
	--&gt;
&lt;/div&gt;
</description>
			<author>handol 한돌</author>
			<guid>http://swguru.kr/1</guid>
			<comments>http://swguru.kr/1#entry1comment</comments>
			<pubDate>Tue, 11 Oct 2011 13:00:46 +0900</pubDate>
		</item>
	</channel>
</rss>

