<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/16539" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2009-01-12T21:31:10-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/16539</id>

		<entry>
		<author><name><![CDATA[intel]]></name></author>
		<updated>2009-01-12T21:31:10-04:00</updated>

		<published>2009-01-12T21:31:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=86893#p86893</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=86893#p86893"/>
		<title type="html"><![CDATA[Abbreviate Time]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=86893#p86893"><![CDATA[
Thanx. I did try that really long way but I didnt have it in that order so it did not work. It was still doing ms (for minutes) and ss (for seconds)<br><br>Thanx.  Appreciate the help.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9747">intel</a> — Mon Jan 12, 2009 9:31 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2009-01-12T20:08:27-04:00</updated>

		<published>2009-01-12T20:08:27-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=86889#p86889</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=86889#p86889"/>
		<title type="html"><![CDATA[Abbreviate Time]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=86889#p86889"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>set ago [string map {" years" "y" " weeks" "w" " days" "d" " hours" "h" " minutes" "m" " seconds" "s" " year" "y" " week" "w" " day" "d" " hour" "h" " minute" "m" " second" "s"} [duration $time1]] </code></pre></div>Make a big long string map in that case. Incith was correct, test these things on your own, so you learn intuitively and interactively.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Mon Jan 12, 2009 8:08 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[incith]]></name></author>
		<updated>2009-01-12T20:00:10-04:00</updated>

		<published>2009-01-12T20:00:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=86887#p86887</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=86887#p86887"/>
		<title type="html"><![CDATA[Abbreviate Time]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=86887#p86887"><![CDATA[
You are mapping "{from} {to}", so if you want to replace hour with h, ... <br><br>{hour} {h} {minute} {m} etc.. you might need to do extra ones for the s, or try with {hour*} but that might end up replacing the whole string &lt;_&lt;.  maybe hour? to check for the 1 additional char.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6130">incith</a> — Mon Jan 12, 2009 8:00 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[intel]]></name></author>
		<updated>2009-01-12T18:01:55-04:00</updated>

		<published>2009-01-12T18:01:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=86884#p86884</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=86884#p86884"/>
		<title type="html"><![CDATA[Abbreviate Time]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=86884#p86884"><![CDATA[
lol  been tryin... used /m /s [m] [s]  not working... so obviously doing something wrong.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9747">intel</a> — Mon Jan 12, 2009 6:01 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[incith]]></name></author>
		<updated>2009-01-12T17:07:38-04:00</updated>

		<published>2009-01-12T17:07:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=86883#p86883</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=86883#p86883"/>
		<title type="html"><![CDATA[Abbreviate Time]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=86883#p86883"><![CDATA[
How about you just fiddle with it until it works the way you want..<br><br><a href="http://www.tcl.tk/man/tcl8.2.3/TclCmd/string.htm#M34" class="postlink">http://www.tcl.tk/man/tcl8.2.3/TclCmd/string.htm#M34</a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6130">incith</a> — Mon Jan 12, 2009 5:07 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[intel]]></name></author>
		<updated>2009-01-12T09:36:48-04:00</updated>

		<published>2009-01-12T09:36:48-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=86881#p86881</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=86881#p86881"/>
		<title type="html"><![CDATA[Abbreviate Time]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=86881#p86881"><![CDATA[
Great.  It works.  Thanx appreciate the all the help.<br>Just curious if I wanted say 12h 15m 10s would that just be<br>" hour" "" " minutes" "" or will just put either nothing or a s at the end (like 12 or 12s instead of 12hr or 12hrs)?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9747">intel</a> — Mon Jan 12, 2009 9:36 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[arfer]]></name></author>
		<updated>2009-01-12T08:14:28-04:00</updated>

		<published>2009-01-12T08:14:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=86880#p86880</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=86880#p86880"/>
		<title type="html"><![CDATA[Abbreviate Time]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=86880#p86880"><![CDATA[
You must include the space character in the mapped items to be replaced as follows :-<br><div class="codebox"><p>Code: </p><pre><code>set ago [string map {" year" "yr" " week" "wk" " day" "dy" " hour" "hr" " minute" "min" " second" "sec"} [duration $time1]]</code></pre></div>For example :-<br><br>[12:19] &lt;@arfer&gt; % return [string map {" year" "yr" " week" "wk" " day" "dy" " hour" "hr" " minute" "min" " second" "sec"} [duration [unixtime]]]<br>[12:19] &lt;@Baal&gt; 39yrs 3wks 12hrs 19mins 6secs<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5705">arfer</a> — Mon Jan 12, 2009 8:14 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[intel]]></name></author>
		<updated>2009-01-12T08:02:52-04:00</updated>

		<published>2009-01-12T08:02:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=86878#p86878</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=86878#p86878"/>
		<title type="html"><![CDATA[Abbreviate Time]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=86878#p86878"><![CDATA[
oh would you know how to get rid of the space?  It says 1 hr 15 min ago  would like 1hr 15min ago<br><br><br>Thanks.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9747">intel</a> — Mon Jan 12, 2009 8:02 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[intel]]></name></author>
		<updated>2009-01-10T20:03:22-04:00</updated>

		<published>2009-01-10T20:03:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=86853#p86853</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=86853#p86853"/>
		<title type="html"><![CDATA[Abbreviate Time]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=86853#p86853"><![CDATA[
awesome... thanx  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_lol.gif" width="15" height="15" alt=":lol:" title="Laughing"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9747">intel</a> — Sat Jan 10, 2009 8:03 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2009-01-10T19:40:29-04:00</updated>

		<published>2009-01-10T19:40:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=86852#p86852</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=86852#p86852"/>
		<title type="html"><![CDATA[Abbreviate Time]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=86852#p86852"><![CDATA[
<blockquote class="uncited"><div>Thanx, but will that do hrs or just hr.  Like 5 hrs ago or 5 hr ago?</div></blockquote>It will change any occurence of "hour" to "hr" which is part of both words, hour and hours. So "hours" will be changed to "hrs", yes. The same goes for the rest of the abbreviations.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Sat Jan 10, 2009 7:40 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[intel]]></name></author>
		<updated>2009-01-10T19:24:27-04:00</updated>

		<published>2009-01-10T19:24:27-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=86851#p86851</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=86851#p86851"/>
		<title type="html"><![CDATA[Abbreviate Time]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=86851#p86851"><![CDATA[
Thanx, but will that do hrs or just hr.  Like 5 hrs ago or 5 hr ago?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9747">intel</a> — Sat Jan 10, 2009 7:24 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2009-01-10T19:05:47-04:00</updated>

		<published>2009-01-10T19:05:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=86848#p86848</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=86848#p86848"/>
		<title type="html"><![CDATA[Abbreviate Time]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=86848#p86848"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>set ago [string map {"year" "yr" "week" "wk" "day" "dy" "hour" "hr" "minute" "min" "second" "sec"} [duration $time1]]</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Sat Jan 10, 2009 7:05 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[intel]]></name></author>
		<updated>2009-01-10T18:58:05-04:00</updated>

		<published>2009-01-10T18:58:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=86847#p86847</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=86847#p86847"/>
		<title type="html"><![CDATA[Abbreviate Time]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=86847#p86847"><![CDATA[
Is there a way when my bot announces the time instead of hours it will display hrs (same for minutes and seconds)?  <br> set time1 [unixtime]<br>  incr time1 -$timestamp<br>  set ago [duration $time1]<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9747">intel</a> — Sat Jan 10, 2009 6:58 pm</p><hr />
]]></content>
	</entry>
	</feed>
