From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Schmitt Subject: babel and computing a number of months Date: Mon, 02 Jun 2014 09:25:24 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42758) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WrMcg-0006FO-2o for emacs-orgmode@gnu.org; Mon, 02 Jun 2014 03:25:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WrMcY-0002cm-Gt for emacs-orgmode@gnu.org; Mon, 02 Jun 2014 03:25:33 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:39841) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WrMcY-0002cY-AL for emacs-orgmode@gnu.org; Mon, 02 Jun 2014 03:25:26 -0400 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode Hello, I need to work with dates for some code/scripts I'm writing in a document making heavy usage of source blocks and babel evaluation. The good news is that I have access to many programming languages, so the bad news is I don't know which one to choose. The problem I want to solve is the following: I want to compute the number of months between march 1st, 2014, and the beginning of the current month (so right now it's 3, but on may 31st it was 2). Is there an easy way to do it in a babel supported language? And is there an easy way to do it in emacs-lisp? Thanks, Alan