FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 08-24-2008, 05:21 PM
Sergio Perticone
 
Default Command-line-interface (CLI) calculator to work out the difference between 2 dates

On 24 Ago, 17:10, "j t" <mark...@gmail.com> wrote:
> [snip]
>
> (I'm happy to use any date format for input - I've only used ISO8601
> as an example)

Maybe something like that:

#!/usr/bin/python

from time import mktime, strptime
from sys import argv

class DummyDate:
def __init__(self, strdate, format):
self.ticks = mktime(strptime(strdate, format));

def __sub__(self, obj):
return int(self.ticks - obj.ticks) / 86400;

(prg, a, b, fmt) = argv
print DummyDate(a, fmt) - DummyDate(b, fmt)
## end

Or using a sh script with date(1)

>
> J :-)

s.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


Sun Aug 24 21:30:01 2008
Return-path: <launchpad-users-bounces@lists.canonical.com>
Envelope-to: tom@linux-archive.org
Delivery-date: Sun, 24 Aug 2008 20:50:42 +0300
Received: from chlorine.canonical.com ([91.189.94.204])
by s2.java-tips.org with esmtp (Exim 4.69)
(envelope-from <launchpad-users-bounces@lists.canonical.com>)
id 1KXJje-00032I-29
for tom@linux-archive.org; Sun, 24 Aug 2008 20:50:42 +0300
Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com)
by chlorine.canonical.com with esmtp (Exim 4.60)
(envelope-from <launchpad-users-bounces@lists.canonical.com>)
id 1KXJjJ-0000Ag-VA; Sun, 24 Aug 2008 18:50:22 +0100
Received: from wr-out-0506.google.com ([64.233.184.224])
by chlorine.canonical.com with esmtp (Exim 4.60)
(envelope-from <ubuntu@bugabundo.net>) id 1KXJjG-0000AW-AL
for launchpad-users@lists.canonical.com; Sun, 24 Aug 2008 18:50:18 +0100
Received: by wr-out-0506.google.com with SMTP id 70so1187844wra.22
for <launchpad-users@lists.canonical.com>;
Sun, 24 Aug 2008 10:50:17 -0700 (PDT)
Received: by 10.90.89.14 with SMTP id m14mr724001agb.29.1219600217275;
Sun, 24 Aug 2008 10:50:17 -0700 (PDT)
Received: from blubug.localnet ( [85.138.204.154])
by mx.google.com with ESMTPS id 24sm6141945wrl.8.2008.08.24.10.50.14
(version=SSLv3 cipher=RC4-MD5); Sun, 24 Aug 2008 10:50:16 -0700 (PDT)
Organization: http://BUGabundo.net
To: launchpad-users@lists.canonical.com
Subject: Re: to follow up on #42139
Date: Sat, 23 Aug 2008 22:48:58 +0100
User-Agent: KMail/1.10.0 (Linux/2.6.26-5-generic; KDE/4.1.0; x86_64; ; )
References: <200808191810.14501.Ubuntu@bugabundo.net>
<200808211202.21410.Ubuntu@bugabundo.net>
<48B02455.4090409@qense.nl>
In-Reply-To: <48B02455.4090409@qense.nl>
MIME-Version: 1.0
Message-Id: <200808232248.59258.Ubuntu@bugabundo.net>
From: "(=?utf-8?q?=60=60-=5F-=C2=B4=C2=B4?=) -- Fernando"
<ubuntu@bugabundo.net>
X-BeenThere: launchpad-users@lists.canonical.com
X-Mailman-Version: 2.1.8
Precedence: list
Reply-To: Ubuntu-reply@bugabundo.net, launchpad-users@lists.canonical.com
List-Id: Discussion for Launchpad users <launchpad-users.lists.canonical.com>
List-Unsubscribe: <https://lists.ubuntu.com/mailman/listinfo/launchpad-users>,
<mailto:launchpad-users-request@lists.canonical.com?subject=unsubscribe>
List-Archive: <https://lists.ubuntu.com/archives/launchpad-users>
List-Post: <mailto:launchpad-users@lists.canonical.com>
List-Help: <mailto:launchpad-users-request@lists.canonical.com?subject=help>
List-Subscribe: <https://lists.ubuntu.com/mailman/listinfo/launchpad-users>,
<mailto:launchpad-users-request@lists.canonical.com?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============0958587602109832416=="
Mime-version: 1.0
Sender: launchpad-users-bounces@lists.canonical.com
Errors-To: launchpad-users-bounces@lists.canonical.com

--===============0958587602109832416==
Content-Type: multipart/signed;
boundary="nextPart1343371.kfRpBqXOIe";
protocol="application/pgp-signature";
micalg=pgp-sha1
Content-Transfer-Encoding: 7bit

--nextPart1343371.kfRpBqXOIe
Content-Type: text/plain;
charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Ol=C3=A1 Sense e a todos.

On Saturday 23 August 2008 15:53:09 Sense Hofstede wrote:
> I do like the idea of assigning certian people to small bits of the
> support questions. However, not all package needs that much support and
> not all developers want or are able to respond to questions. Maybe it
> would be a good idea to allow packages maintainers to assign certain
> teams to their package in Answers. Another option would be that
> Launchpad could support people assigning them to certain categories of
> questions in Answers.

That's exactly what I'm asking here. Glad to see that someone see eye to ey=
e with me.

=2D-=20
BUGabundo )
(``-_-=C2=B4=C2=B4) http://Ubuntu.BUGabundo.net
Linux user #443786 GPG key 1024D/A1784EBB
My new micro-blog @ http://BUGabundo.net
ps. My emails tend to sound authority and aggressive. I'm sorry in advance.=
I'll try to be more assertive as time goes by...

--nextPart1343371.kfRpBqXOIe
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEABECAAYFAkiwhcsACgkQcV4wzCrhCcp6nwCfQxMxxMgaO0 zc8qf4HxP9BnuE
cyoAnR8GwcwIWoo733NqNp1FDR89dGV8
=onoJ
-----END PGP SIGNATURE-----

--nextPart1343371.kfRpBqXOIe--


--===============0958587602109832416==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

--
launchpad-users mailing list
launchpad-users@lists.canonical.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/launchpad-users

--===============0958587602109832416==--


Sun Aug 24 21:30:01 2008
Return-path: <launchpad-users-bounces@lists.canonical.com>
Envelope-to: tom@linux-archive.org
Delivery-date: Sun, 24 Aug 2008 20:51:13 +0300
Received: from chlorine.canonical.com ([91.189.94.204])
by s2.java-tips.org with esmtp (Exim 4.69)
(envelope-from <launchpad-users-bounces@lists.canonical.com>)
id 1KXJk9-00033X-Ct
for tom@linux-archive.org; Sun, 24 Aug 2008 20:51:13 +0300
Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com)
by chlorine.canonical.com with esmtp (Exim 4.60)
(envelope-from <launchpad-users-bounces@lists.canonical.com>)
id 1KXJk6-0000Ku-44; Sun, 24 Aug 2008 18:51:10 +0100
Received: from wr-out-0506.google.com ([64.233.184.237])
by chlorine.canonical.com with esmtp (Exim 4.60)
(envelope-from <ubuntu@bugabundo.net>) id 1KXJk4-0000KX-FN
for launchpad-users@lists.canonical.com; Sun, 24 Aug 2008 18:51:08 +0100
Received: by wr-out-0506.google.com with SMTP id 70so1188069wra.22
for <launchpad-users@lists.canonical.com>;
Sun, 24 Aug 2008 10:51:07 -0700 (PDT)
Received: by 10.90.102.15 with SMTP id z15mr4250041agb.58.1219600267685;
Sun, 24 Aug 2008 10:51:07 -0700 (PDT)
Received: from blubug.localnet ( [85.138.204.154])
by mx.google.com with ESMTPS id 24sm6141945wrl.8.2008.08.24.10.50.51
(version=SSLv3 cipher=RC4-MD5); Sun, 24 Aug 2008 10:51:06 -0700 (PDT)
Organization: http://BUGabundo.net
To: "Graham Binns" <graham@canonical.com>
Subject: Re: Bugzilla and Trac plugins: Request for beta testers
Date: Sun, 24 Aug 2008 01:47:40 +0100
User-Agent: KMail/1.10.0 (Linux/2.6.26-5-generic; KDE/4.1.0; x86_64; ; )
References: <d9d0a00d0808221503x47377f68x6b89bf50dea4fd18@mail .gmail.com>
In-Reply-To: <d9d0a00d0808221503x47377f68x6b89bf50dea4fd18@mail .gmail.com>
MIME-Version: 1.0
Message-Id: <200808240147.41460.Ubuntu@bugabundo.net>
From: "(=?utf-8?q?=60=60-=5F-=C2=B4=C2=B4?=) -- Fernando"
<ubuntu@bugabundo.net>
Cc: launchpad-users@lists.canonical.com
X-BeenThere: launchpad-users@lists.canonical.com
X-Mailman-Version: 2.1.8
Precedence: list
Reply-To: Ubuntu-reply@bugabundo.net, launchpad-users@lists.canonical.com
List-Id: Discussion for Launchpad users <launchpad-users.lists.canonical.com>
List-Unsubscribe: <https://lists.ubuntu.com/mailman/listinfo/launchpad-users>,
<mailto:launchpad-users-request@lists.canonical.com?subject=unsubscribe>
List-Archive: <https://lists.ubuntu.com/archives/launchpad-users>
List-Post: <mailto:launchpad-users@lists.canonical.com>
List-Help: <mailto:launchpad-users-request@lists.canonical.com?subject=help>
List-Subscribe: <https://lists.ubuntu.com/mailman/listinfo/launchpad-users>,
<mailto:launchpad-users-request@lists.canonical.com?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============6814739948380585996=="
Mime-version: 1.0
Sender: launchpad-users-bounces@lists.canonical.com
Errors-To: launchpad-users-bounces@lists.canonical.com

--===============6814739948380585996==
Content-Type: multipart/signed;
boundary="nextPart152457266.ElVsGgeknC";
protocol="application/pgp-signature";
micalg=pgp-sha1
Content-Transfer-Encoding: 7bit

--nextPart152457266.ElVsGgeknC
Content-Type: text/plain;
charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Ol=C3=A1 Graham e a todos.

On Friday 22 August 2008 23:03:43 Graham Binns wrote:
> Greetings, Launchpadders,
>=20
> The Launchpad Bugs team needs your help!
>=20
> We've recently developed Launchpad plugins for Trac and Bugzilla. The
> plugins allow bidirectional communication between Launchpad and the
> remote bug trackers that have them installed, and we need help testing
> them. That's where you come in.
>=20
> If you know of any bug tracker whose administrators may be interested in
> installing the plugin for interoperating with Launchpad - or indeed if
> you run such a bug tracker yourself - please email us at
> feedback@launchpad.net and let us know.
>=20
> You can find details on how to install the plugins and what you need to do
> to get Launchpad to work with your bugtracker on the Launchpad Help wiki:
>=20
> For Bugzilla: http://help.launchpad.net/Bugs/BugzillaPlugin
> For Trac: http://help.launchpad.net/Bugs/TracPlugin
>=20
> Installing one of the plugins means that:
>=20
> * Launchpad will be able to forward bugs to upstream bug trackers that
> have the plugin installed. Users of those bug trackers won't have to
> check Launchpad for bugs registered against their project; they'll be
> forwarded straight to the upstream tracker.
>=20
> * If a bug watch is created against an upstream bug, Launchpad will
> tell the upstream bug tracker which Launchpad bug is watching it.
> This means that not only is there a link in Launchpad to the upstream
> bug, but there's also a link in the upstream bug tracker to the
> Launchpad bug.
>=20
> * Launchpad will be able to import comments from upstream bugs which
> are being watched in Launchpad. If you register a bug watch against
> an upstream bug you'll be able to read the conversation about that
> bug on Launchpad, including the comments that are made on the
> upstream bug tracker.
>=20
> * Launchpad will be able to push comments to upstream bugs which are
> linked to a Launchpad bug, so if you add a comment on Launchpad in
> reply to a comment which was imported from an upstream bug tracker,
> the comment will automatically be added to the conversation on the
> upstream bug tracker, too. This means that users of both Launchpad
> and the upstream tracker can view the whole conversation about the
> bug without leaving their preferred environments.
>=20
> Thanks in advance for your help,
>=20
> Graham

Is anyone working with major upstreams to test this? Maybe Jorge?
I would love to see GNOME, KDE, Mozilla (etc) implement this.

And maybe this can answer my other thread: can malone work wit this too? is=
there a flag/command to instruck LP/malone to submit upstream?

=2D-=20
BUGabundo )
(``-_-=C2=B4=C2=B4) http://Ubuntu.BUGabundo.net
Linux user #443786 GPG key 1024D/A1784EBB
My new micro-blog @ http://BUGabundo.net
ps. My emails tend to sound authority and aggressive. I'm sorry in advance.=
I'll try to be more assertive as time goes by...

--nextPart152457266.ElVsGgeknC
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEABECAAYFAkiwr60ACgkQcV4wzCrhCcopIwCfY2BoEKdHVu C8TsatS+DYywWu
dBwAniW0wmZNw5PISuoxJSm68CPPjodr
=oogK
-----END PGP SIGNATURE-----

--nextPart152457266.ElVsGgeknC--


--===============6814739948380585996==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

--
launchpad-users mailing list
launchpad-users@lists.canonical.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/launchpad-users

--===============6814739948380585996==--
 

Thread Tools




All times are GMT. The time now is 06:48 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org