Java HTML Jsoup Element getDate(Elements caption)

Here you can find the source of getDate(Elements caption)

Description

get Date

License

LGPL

Declaration

public static Date getDate(Elements caption) 

Method Source Code

//package com.java2s;
//License from project: LGPL 

import java.util.Date;

import org.joda.time.DateTime;
import org.joda.time.format.DateTimeFormat;
import org.joda.time.format.DateTimeFormatter;

import org.jsoup.select.Elements;

public class Main {
    public static Date getDate(Elements caption) {
        String date = caption.text();
        DateTimeFormatter dtf = DateTimeFormat.forPattern("dd/MM/yyyy");
        return DateTime.parse(date, dtf).toDate();
    }//from   w  w  w .  j av  a  2  s . c o m
}

Related

  1. firstElement(final Element element, final String... tags)
  2. getActiveJob(Element element)
  3. getAllNodes(Element element)
  4. getAuthorName(Element authorElement)
  5. getCodeSnippetCLT(Element codeElement, String content, String fqn, String api, String kind, String[] titles)
  6. getDouble(Elements line, int idx)
  7. getElementByXPath(String xpath, Document doc)
  8. getElementsByClass(String className, Element boardElement)
  9. getElementsFirstLevel(String html)