Question: I am trying to add weeks in decimal values like 1.5, 2.5 to date through strtotime() function. But its not giving correct result. I am using it like:

```
$start_date = "2015-01-01";

$date = strtotime(date("Y-m-d", strtotime($start_date)) . " +3.5 weeks");

$date = date("Y-m-d",$date);

echo $date;

```

And its giving 2015-02-04 as output. When added non decimal values like:

```
$date = strtotime(date("Y-m-d", strtotime($start_date)) . " +3 weeks");

```

It gives perfect results.

Any thought on it?

Answer: 
Actually, java enums are a pretty handy object.
You can add properties, even methods, if you want. To assign properties, just add the value as an argument to the contructor as in:

```
public enum AccessType {
    Full(0),
    ReadOnly(1),
    Delete(2),
    Add(3);
    private final int code;

    AccessType(int code) {
        this.code = code
    }

    public int getCode() {
        return this.code;
    }
}

```
Please have a look at this page from Oracle: <http://docs.oracle.com/javase/tutorial/java/javaOO/enum.html>

You would have something like this for your ENUM (code untested):

```
public enum AccessType
{
    Full(0),
    ReadOnly(1),
    Delete(2),
    Add(3);

    AccessType(int type)
    {
        this.type = type;
    }
}

```

But the constructor by itself may not be necessary since you can use a switch case like this:

```
switch(AllLists.get(pos).Access)
{
    case Full:
        // ...
        break;

    case ReadOnly:
        // ...
        break;

    case Delete:
        // ...
        break;

    case Add:
        // ...
        break;
}

```